Re: [Endymail] Why S/MIME and OpenPGP ecosystems fall short

Michael Kjörling <michael@kjorling.se> Wed, 03 June 2015 09:59 UTC

Return-Path: <michael@kjorling.se>
X-Original-To: endymail@ietfa.amsl.com
Delivered-To: endymail@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 059D91A00DF for <endymail@ietfa.amsl.com>; Wed, 3 Jun 2015 02:59:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 2.049
X-Spam-Level: **
X-Spam-Status: No, score=2.049 tagged_above=-999 required=5 tests=[BAYES_50=0.8, HELO_EQ_SE=0.35, J_CHICKENPOX_74=0.6, MIME_8BIT_HEADER=0.3, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QtaWJeLO6C7O for <endymail@ietfa.amsl.com>; Wed, 3 Jun 2015 02:59:34 -0700 (PDT)
Received: from nekare.kjorling.se (nekare.kjorling.se [89.221.249.175]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F33D81A0087 for <endymail@ietf.org>; Wed, 3 Jun 2015 02:59:33 -0700 (PDT)
Received: by nekare.kjorling.se (Postfix, from userid 1001) id 8A2E6114083; Wed, 3 Jun 2015 09:59:31 +0000 (UTC)
X-Spam-Details: BAYES_00=-1.9, SPF_FAIL=0.001, T_FILL_THIS_FORM_SHORT=0.01 (nekare.kjorling.se)
Received: from yeono.kjorling.se (h-9-65.a328.priv.bahnhof.se [46.59.9.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "yeono", Issuer "yeono" (not verified)) by nekare.kjorling.se (Postfix) with ESMTPS id BB98C114073 for <endymail@ietf.org>; Wed, 3 Jun 2015 09:59:19 +0000 (UTC)
Received: from yeono.kjorling.se (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by yeono (Postfix) with ESMTPS id 7913A17F1 for <endymail@ietf.org>; Wed, 3 Jun 2015 11:59:19 +0200 (CEST)
Date: Wed, 03 Jun 2015 09:59:17 +0000
From: Michael Kjörling <michael@kjorling.se>
To: endymail@ietf.org
Message-ID: <20150603095917.GC25546@yeono.kjorling.se>
References: <CACsn0c=1RfwZF3-ynoaer=QkRXE56Mzwe1y50QQirW=GMBwvYA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CACsn0c=1RfwZF3-ynoaer=QkRXE56Mzwe1y50QQirW=GMBwvYA@mail.gmail.com>
Archived-At: <http://mailarchive.ietf.org/arch/msg/endymail/u2jvOdV9aytjnc-EGN1KwmjtDbM>
Subject: Re: [Endymail] Why S/MIME and OpenPGP ecosystems fall short
X-BeenThere: endymail@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <endymail.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/endymail>, <mailto:endymail-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/endymail/>
List-Post: <mailto:endymail@ietf.org>
List-Help: <mailto:endymail-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/endymail>, <mailto:endymail-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Jun 2015 09:59:36 -0000

On 1 Jun 2015 22:07 -0700, from watsonbladd@gmail.com (Watson Ladd):
> Compare to what happens with GPG. Immediately the user is asked to
> make important choices with no guidance. Key discover is separate
> step. When sending messages, they have to choose several orders of
> operations and ciphers, with the wrong choice having consequences. I
> don't think any choices have the right semantics. A lot of this has
> been ruled out of scope as UI issues, but I don't think so: I think
> that solving these issues require removing many of the problems that
> we expose to users. Certainly some plugins do a very good job of
> fixing some of these headaches, but I don't think any of them are as
> reliable as TextSecure.

I have absolutely zero experience with TextSecure so cannot compare
against that, but are you talking about the _protocols and standards_
(OpenPGP) or the _implementation_ (GnuPG, PGP) in the above? GnuPG is
somewhat technical, but OpenPGP does not have to be exposed that way
to the user.

We can fix the _implementation_ by making sure the defaults offered
are reasonable and secure (according to current knowledge, adjusting
over time as necessary and maintaining a margin for error) and adding
a very first step asking whether the user wants a simple or advanced
key generation process. The simple process would use those default
values and only prompt the user for what is specifically needed
(perhaps only their name, email address and desired passphrase); the
advanced process would allow the user to select algorithm, key size,
etc just like the normal key generation process in GnuPG does today.
This would be reasonable because _the defaults should already be
reasonably safe_; if they aren't, then they should be adjusted.

The simple process could even start out by generating a small,
throwaway key pair (say, perhaps, a 256-bit RSA key pair) with a short
generation wallclock timeout _to determine the system's performance_
and adjust the key length to be generated upwards if the system is
fast enough to handle generating and using a longer key pair. _For
example_, set the default to RSA encrypt+sign with a 2048 bit modulus,
but if the system is fast enough to _generate_ a 256 bit RSA key pair
within, say, 200 ms, _then_ use 3072 bits instead; if 100 ms, _then_
4096 bits instead. (Modulus lengths and timings are arbitrary and for
example purposes only.) This will allow the software to gracefully
move toward longer keys when the system is fast enough to handle them,
without needing modification later, at the cost of a small amount of
entropy (which could in principle be fed back into the system PRNG).

With something like that, we remove at least _one_ of the major
obstacles you (quite rightly) point out, namely the user immediately
being confronted with the choice of (in my case) RSA/RSA
(sign/encrypt), DSA/ElGamal, DSA (sign only) and RSA (sign only),
followed by picking a key size. If the current defaults (with GnuPG,
dual-use RSA 2048 bits modulus) are reasonably sane then regular users
don't need to be confronted with those choices and we don't compromise
security compared to today, yet power users can be given the
opportunity to shoot themselves in the foot (or pick a higher degree
of security at the cost of some performance).

This doesn't solve key distribution and discovery, but it should solve
at least one part of key generation.

-- 
Michael Kjörling • https://michael.kjorling.semichael@kjorling.se
OpenPGP B501AC6429EF4514 https://michael.kjorling.se/public-keys/pgp
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)