Re: [dispatch] Updating DKIM for stronger crypto

Eric Rescorla <ekr@rtfm.com> Tue, 07 February 2017 00:06 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F32DC1297C3 for <dispatch@ietfa.amsl.com>; Mon, 6 Feb 2017 16:06:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 dpzIa24HsND8 for <dispatch@ietfa.amsl.com>; Mon, 6 Feb 2017 16:06:15 -0800 (PST)
Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 95F5E1297BF for <dispatch@ietf.org>; Mon, 6 Feb 2017 16:06:15 -0800 (PST)
Received: by mail-yw0-x232.google.com with SMTP id w75so58064386ywg.1 for <dispatch@ietf.org>; Mon, 06 Feb 2017 16:06:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VQwenK9eYrAOAi5I4HyEh91kXV0pP3keX2bg1eydLuY=; b=A8UNE2hlDDcAqzcfuT6Gk4UBS1rA8FZH+9d9OEol+w8GxVAnUhIgR/iChrvisfaqRc OQqbPtxvOcZEJw67WwF9wMwaSiusCQj/r2qed6rxDfIA+StJn2j9a14lUVsc2a+2CqUz 5MBwci5JRP/VltcDlzJnN6xwLCmwGZ+Tm3qUG4ymWWg/oCpsIR7kHYGorUMyjX5xZCQ1 QRPi9V7KQ6a42xSfyGDe7y28anE8oRIq9Jy+zmO+UvJs8298D/V4IkVAIogVB5Ku7KpP sNtWI873HaOtElpa7Mx/wcQQV+16xMQCKCCev+TSo3bQV++lBwwQorRge0YLu/O0jk9F lW4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VQwenK9eYrAOAi5I4HyEh91kXV0pP3keX2bg1eydLuY=; b=e7mi20dOZTnyMVMAYDpV0j50pIDus46s3XmxMK3ByrmTpgqhpdXzMhCJ9zT/wStBhF uN38/mOVe6AnlGqQrsU+Mx+wNZUu5hHUhmtE9+u+NwVC8nvO+Q7qmbmn8LpBJdeYnua9 R4oMyXhctblXi1CXMpf9Pjr8X/+0GN27gpvakkq80kShXV22P+zEhKL8cQn42IV7B0CK tpU3VIovQGdfmXmla1i3eMa07Mhe9Talbtvx9EFL+0/egZYbysmhQGTbhRC0cINfmiz5 rDXzWhSNR3v9+VDTLuanp8L6E2IpReSIBI/RcSWcLNRV7m/dFoWuGCw0kjb4lco3jEm5 p8Iw==
X-Gm-Message-State: AMke39ledZrHKwbdioBxRsZjiPjgvP5q+C6RLg5JGFiNbXGsBf8OVaUEEToxweFcv7OT0Efuobrdv/HSK9Wxhw==
X-Received: by 10.129.162.151 with SMTP id z145mr8892851ywg.337.1486425974818; Mon, 06 Feb 2017 16:06:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.13.204.80 with HTTP; Mon, 6 Feb 2017 16:05:34 -0800 (PST)
In-Reply-To: <alpine.OSX.2.20.1702061845230.23435@ary.qy>
References: <20170206020826.1108.qmail@ary.lan> <CABcZeBMgPZQhvtve85L=nC9X9WxWaRYYMSm98qbV2Fgv71GjAw@mail.gmail.com> <alpine.OSX.2.20.1702061845230.23435@ary.qy>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 06 Feb 2017 16:05:34 -0800
Message-ID: <CABcZeBOUfiiPwSOVaakTGKvFq6ZF1NLnoKoyQ0qDiB+19=OQZQ@mail.gmail.com>
To: John R Levine <johnl@taugh.com>
Content-Type: multipart/alternative; boundary="94eb2c11555e36ee6b0547e58460"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/HhJGIVWEPQbsZL8XoNiZeD-YpTw>
Cc: DISPATCH <dispatch@ietf.org>
Subject: Re: [dispatch] Updating DKIM for stronger crypto
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Feb 2017 00:06:17 -0000

On Mon, Feb 6, 2017 at 3:48 PM, John R Levine <johnl@taugh.com> wrote:

> Needless to say, 512 bits is now way too weak, and 1K is iffy, so it
>>> would be a good idea to update the advice.
>>>
>>
>> Well, I certainly agree that at some point it would be good to get to
>> larger
>> than 1024-bit RSA keys, we're fairly far from the point where it's cheap
>> to factor a 1024-bit RSA key ...
>>
>
> It's not urgent, but given the ARC work, it'd be nice to do this once
> rather than twice.
>
> It seems like this message suggests that the decision to store the key in
>> the TXT record is perhaps not the optimal design. If you were storing a
>> digest (as DANE does) then you could use arbitrary sized RSA keys without
>> running into the 256-character limit. This would also have the advantage
>> that if you ever needed to move to some post-quantum algorithm with big
>> keys (e.g., digest signatures), you would be in a somewhat better
>> position.
>>
>
> Hmmn.  So we'd put a copy of the verification key into the signature, and
> the verifier would hash that and see if it matched the hash in the DNS?


Yes.



>   I suppose that could work, but if we're going to open up the code, given
> that elliptic signers and verifiers are showing up in crypto libraries it's
> be a lot simpler change to DKIM.


I don't see why this would be the case. Think of signature verification as
a function

  F(K, M) -> {true, false}

Ordinarily K is the public key, and M is the message, but if you instead
store H(K_pub)
in the DNS, and send M = {K_pub, Message}, it's the same underlying
interface. And
as I indicated, this has other benefits, which include being able to handle
cryptographic
systems with much larger public keys if we ever need them.

-Ekr


> Regards,
> John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY
> Please consider the environment before reading this e-mail. https://jl.ly
>