<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.26 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-rsalz-drbg-speck-wap-wep-01" category="bcp">

  <front>
    <title abbrev="crypto-pubreview">No MTI Crypto without Public Review</title>

    <author initials="R." surname="Salz" fullname="Rich Salz">
      <organization>Akamai Technologies</organization>
      <address>
        <email>rsalz@akamai.com</email>
      </address>
    </author>

    <date year="2016" month="July" day="08"/>

    
    
    

    <abstract>


<t>Cryptography is becoming more important to the IETF and its protocols,
and more IETF protocols are using, or looking at, cryptography to
increase privacy on the Internet <xref target="RFC7258"/>.</t>

<t>This document specifies a proposed best practice for any mechanism (or data
format) that uses cryptography; namely, that RFCs cannot specify an
algorithm as mandatory-to-implement (MTI) unless that algorithm has had
reasonable public review. This document also “sketches out” a rough
definition around what such a review would look like.</t>



    </abstract>


  </front>

  <middle>


<section anchor="terminology" title="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 RFC 2119 <xref target="RFC2119"/>.</t>

<t>The term mandatory to implement (MTI) is used in this document
to describe a cryptographic algorithm that is listed as a MUST
in an RFC.</t>

<t>The term “snake oil” is used as a pejorative for something
which appears to do its job acceptably, but actually does not; see
<eref target="https://en.wikipedia.org/wiki/Snake_oil_%28cryptography%29">https://en.wikipedia.org/wiki/Snake_oil_%28cryptography%29</eref>.  It is a goal
of the IETF that we never be misled into being, or mistakenly taken as,
snake oil salesman.</t>

</section>
<section anchor="introduction" title="Introduction">

<t>Cryptography is becoming more important to the IETF and its protocols,
and more IETF protocols are using, or looking at, cryptography to
increase privacy on the Internet <xref target="RFC7258"/>.</t>

<t>This document specifies a proposed best practice for any protocol (or data
format) that uses cryptography. Namely, that such RFCs cannot specify an
algorithm as mandatory-to-implement (MTI) unless that algorithm has had
reasonable public review. This document also “sketches out” a rough
definition around what such a review would look like.</t>

</section>
<section anchor="why-is-cryptography-hard" title="Why is Cryptography Hard?">

<t>Cryptography is hard because it is not like traditional IETF protocol
deployments.  In this classic situation, if one party implements
a protocol incorrectly, it usually becomes obvious as interoperability
suffers or completely fails.  But with cryptography, one party can have
implementation defects, or known exploitable weaknesses, that expose the
entire communication stream to an attacker.  Open source and code reviews are
not a panacea here, but using only widely-accepted cryptographic mechanisms
(e.g., avoiding facilities like <eref target="https://en.wikipedia.org/wiki/Dual_EC_DRBG">https://en.wikipedia.org/wiki/Dual_EC_DRBG</eref>)
will reduce the attack surface.</t>

<t>Cryptography is hard because subtle design characteristics can have
disastrous consequences.  For example, the US Digital Signature Algorithm
requires the random nonce to be protected and never re-used.  If those
requirements are not met, the private key can be leaked.</t>

<t>Cryptography is hard because adversaries design new attacks and refine
existing ones.  Attacks get better over time; they never get worse.
For example, it is now de riguer to protect against CPU timing attacks,
even when the device is only viewable over a network.  A recent paper
<xref target="acoustic"/>
(XXX reference) can identify a private key if your smartphone is just laid
next to an innocuous charging device.  We understand power differential
attacks, timing attacks, and perhaps cache line attacks; we now have to
think about RFI emissions from our phone.</t>

<t>Cryptography is hard because the order of operations can matter.  It is
not intuitively obvious to most developers, which should come first among
signing, compression and encryption. This issues was first raised in Spring
of 2001 <xref target="davis"/> but was only addressed in TLS by <xref target="RFC7366"/> more than a
dozen years later.</t>

<t>Getting the cryptography right is important because the Internet, and
therefore the work of the IETF, has become a tempting target for all types
of attackers, from individual “script kiddies,” through criminal commercial
botnet and phishing ventures, up to national-scale adversaries operating
on behalf of their nation-state.</t>

</section>
<section anchor="things-to-avoid" title="Things to avoid">

<t>“Sunlight is said to be the best of disinfectants; electric light the most
efficient policeman.” – Louis Brandeis, <spanx style="emph">Other People’s Money and How Bankers
Use it,</spanx> first published as a set of articles in <spanx style="emph">Harper’s Weekly</spanx> in 1914.</t>

<t>Cryptography that is developed in private, such as among an industry
consortium is a bad idea.  Notable examples of this include:</t>

<t><list style="symbols">
  <t>A5/1 and A5/2 for GSM-based mobile phones.</t>
  <t>WEP and WPA for WiFi access.</t>
  <t>SSLv2, while published, was developed by a private group at an Internet
startup.  It had security flaws that had global effects decades later,
see <eref target="https://drownattack.com/">https://drownattack.com/</eref>.</t>
</list></t>

<t>It is hard to get good public review of patented cryptography, unless there
is a strongly compelling need.  For example, decades ago RSA was the only
practial public-key mechanism available and it was therefore studied pretty
extensively.</t>

<t>Part of the concern about patented
cryptography is that the patent-holder has every incentive to provide that
their system is good, while the rest of the world generally has little
interest in proving that their commercial venture is bad.  Examples of this
include:</t>

<t><list style="symbols">
  <t>Algebraic Eraser, prior to its presentation at IETF-xx, received little
public interest.</t>
  <t>There is not a great deal of study about NTRU.</t>
</list></t>

<t>Both of these items are “lattice cryptography” and that might also be a
reason for lack of review; the field might not have much interest yet.</t>

<t><list style="symbols">
  <t>XXX STILL MORE NEEDED</t>
</list></t>

</section>
<section anchor="why-limit-to-mti" title="Why limit to MTI?">

<t>There is an argument that any new RFC not classified as “historical”
should not specify or recommend insufficiently-reviewed cryptography,
whether it MTI or not.  This document limits itself to MTI for a couple
of reasons.</t>

<t><list style="symbols">
  <t>Informational RFCs often document how to interoperate with other systems,
and this is useful.  As examples of this, see the Internet-Drfats on
scrypt and <xref target="RFC7693"/>.</t>
  <t>Putting insufficiently-reviewed algorithms into an RFC can be one way to
spur interest in getting more reviews.
This MUST NOT be the primary motivation for inclusion, but it can be a
useful side-effect, and might lead to future “promotion” to MTI.
Note that waiting through draft and last-call state, then claiming “nobody
broke it” MUST NOT be used as the rationale; this is using the IETF
to host a “proof by contest.”</t>
  <t>Drawing a strict boundary just around MTI is a tractable problem.
Drawing a similar boundary around all potential IETF uses of cryptography
is bound to have mistakes and errors, any one of which can has the
potential to make the IETF look bad, if not incompetent.</t>
  <t>Requiring MTI to have public review also pressures everyone to conform
and raise the bar. Imagine a hypothetical national security body that has a new
cryptographic algorithm, Military Top-secret Encryption, or MITE.
If MITE is not MTI, then that government might be hard-pressed to get it
accepted into off-the-shell offerings.  If it is MTI without sufficient
review, then they have good reason to keep flaws in existing cryptography
private.  To avoid both situations, the that government should work to
get MITE as an MTI, and would now have the burden to make sure it receives
sufficient analysis.</t>
</list></t>

</section>
<section anchor="how-to-do-it-right" title="How to Do it Right">

<t>Cryptographic agility, <xref target="RFC7696"/>, is probably a MUST.
While it has its detractors, there are no known (to the author)
practical considerations to evolving a deployed based to stronger
crypto, while still maintaining interoperability with existing 
entities.
This requires being able to make informed choices about when to use old
weak crypto, and when to use the “latest and greatest,” and while not much
software, and essentially no end-users, are capable of making that choice,
it seems sadly the best we can do.</t>

<t>NIST is an important reference for crypto algorithms. Yes, they have made
mistakes (DUAL_EC_DRBG), but so has the IETF (opaque-prf) in the same
area.  But they have run respected international contests and their output
receives heavy scrutiny.</t>

<t>The second consideration is to avoid temptation and premature optimization.
Do not adopt an algorithm just because it seems “small and fast” or comes
from “someone I respect.”</t>

<section anchor="public-review" title="Public Review">

<t>What constitutes sufficient public review?  It is hard to say.  This
section attempts to provide some guidelines.</t>

<t>An open
competition, such as those that led to AES (XXX ref) and SHA-3 (XXX ref)
seem to be good, even when they come from sources that are under widespread
suspicion, like the US Government. These efforts, like the Password Hashing
Competition <eref target="https://password-hashing.net/">https://password-hashing.net/</eref>, had
wide international participation and analysis by many noted exports.</t>

<t>Papers presented in the various Crypto conferences (XXX need list) are
good.  Same for various Usenix workshops.</t>

<t>Proof by contest – “Nobody’s Claimed my $200 reward” – are generally
useless, for a number of reasons.
They tend to be promoted by amateur cryptographers as a way to get
attention, and if someone actually looks at them they are always cracked.
Numerical analysis is a better approach, albeit much harder work.
Contests designed to show the amount of “brute-force” work needed, such
as the old RSA factoring challenges, can be useful.
But they do not show, for example, if the cryptography under test is
fundamentally flawed or not.</t>

<t>Public review is also a natural fit for the IETF, which takes “rough
consensus and running code” as an axiom. Theory reduced to practice is
much easier, and much less of a limited academic exercise, to review.</t>

</section>
</section>
<section anchor="acknowledgements" title="Acknowledgements">

<t>Thanks to Stephen Farrell for instigating this.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference  anchor='RFC2119' target='http://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>




    </references>

    <references title='Informative References'>





<reference  anchor='RFC7258' target='http://www.rfc-editor.org/info/rfc7258'>
<front>
<title>Pervasive Monitoring Is an Attack</title>
<author initials='S.' surname='Farrell' fullname='S. Farrell'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig'><organization /></author>
<date year='2014' month='May' />
<abstract><t>Pervasive monitoring is a technical attack that should be mitigated in the design of IETF protocols, where possible.</t></abstract>
</front>
<seriesInfo name='BCP' value='188'/>
<seriesInfo name='RFC' value='7258'/>
<seriesInfo name='DOI' value='10.17487/RFC7258'/>
</reference>



<reference  anchor='RFC7366' target='http://www.rfc-editor.org/info/rfc7366'>
<front>
<title>Encrypt-then-MAC for Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
<author initials='P.' surname='Gutmann' fullname='P. Gutmann'><organization /></author>
<date year='2014' month='September' />
<abstract><t>This document describes a means of negotiating the use of the encrypt-then-MAC security mechanism in place of the existing MAC-then-encrypt mechanism in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS).  The MAC-then-encrypt mechanism has been the subject of a number of security vulnerabilities over a period of many years.</t></abstract>
</front>
<seriesInfo name='RFC' value='7366'/>
<seriesInfo name='DOI' value='10.17487/RFC7366'/>
</reference>



<reference  anchor='RFC7693' target='http://www.rfc-editor.org/info/rfc7693'>
<front>
<title>The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC)</title>
<author initials='M-J.' surname='Saarinen' fullname='M-J. Saarinen' role='editor'><organization /></author>
<author initials='J-P.' surname='Aumasson' fullname='J-P. Aumasson'><organization /></author>
<date year='2015' month='November' />
<abstract><t>This document describes the cryptographic hash function BLAKE2 and makes the algorithm specification and C source code conveniently available to the Internet community.  BLAKE2 comes in two main flavors: BLAKE2b is optimized for 64-bit platforms and BLAKE2s for smaller architectures.  BLAKE2 can be directly keyed, making it functionally equivalent to a Message Authentication Code (MAC).</t></abstract>
</front>
<seriesInfo name='RFC' value='7693'/>
<seriesInfo name='DOI' value='10.17487/RFC7693'/>
</reference>



<reference  anchor='RFC7696' target='http://www.rfc-editor.org/info/rfc7696'>
<front>
<title>Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms</title>
<author initials='R.' surname='Housley' fullname='R. Housley'><organization /></author>
<date year='2015' month='November' />
<abstract><t>Many IETF protocols use cryptographic algorithms to provide confidentiality, integrity, authentication, or digital signature.  Communicating peers must support a common set of cryptographic algorithms for these mechanisms to work properly.  This memo provides guidelines to ensure that protocols have the ability to migrate from one mandatory-to-implement algorithm suite to another over time.</t></abstract>
</front>
<seriesInfo name='BCP' value='201'/>
<seriesInfo name='RFC' value='7696'/>
<seriesInfo name='DOI' value='10.17487/RFC7696'/>
</reference>


<reference anchor="acoustic" target="http://www.tau.ac.il/~tromer/papers/acoustic-20131218.pdf">
  <front>
    <title>RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis</title>
    <author fullname="Daniel Genkin">
      <organization>Technion and Tel Aviv University</organization>
    </author>
    <author fullname="Adi shamir">
      <organization>Weizmann Institute of Science</organization>
    </author>
    <author fullname="Eran Tromer">
      <organization>Tel Aviv University</organization>
    </author>
    <date year="2013" month="December" day="18"/>
  </front>
</reference>
<reference anchor="davis" target="http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.PDF">
  <front>
    <title>Defective Sign &amp; Encrypt in S/MIME, PKCS#7, MOSS, PEM, PGP, and XML.</title>
    <author >
      <organization></organization>
    </author>
    <date year="2001" month="June" day="25"/>
  </front>
  <seriesInfo name="Usenix" value="Proc. Usenix Tech. Conf."/>
</reference>


    </references>



  </back>
</rfc>

