Re: [dmarc-ietf] indeterminisim of ARC-Seal b= value

Peter Goldstein <peter@valimail.com> Tue, 28 March 2017 05:30 UTC

Return-Path: <peter@valimail.com>
X-Original-To: dmarc@ietfa.amsl.com
Delivered-To: dmarc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 50474126C89 for <dmarc@ietfa.amsl.com>; Mon, 27 Mar 2017 22:30:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.019
X-Spam-Level:
X-Spam-Status: No, score=-1.019 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_FONT_FACE_BAD=0.981, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=valimail.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 El6L3pCnRG-3 for <dmarc@ietfa.amsl.com>; Mon, 27 Mar 2017 22:30:39 -0700 (PDT)
Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (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 E2D14126D85 for <dmarc@ietf.org>; Mon, 27 Mar 2017 22:30:38 -0700 (PDT)
Received: by mail-qt0-x22f.google.com with SMTP id r45so55518402qte.3 for <dmarc@ietf.org>; Mon, 27 Mar 2017 22:30:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valimail.com; s=google2048; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EPSkHIOZbQW3C5BLerJqq+hTy0Pg/3pTL/4xIVor770=; b=LkA3h7D7exARt3SQ4etwZdxaL49Oz0VOMCvPvub0nt/TtzEE0mZsCNPkLGr85N5o1M JQj15bAQqVTrFO3zNI8tYIoPSx0j/TGSNpj4aQeXRdWidhX60XRkElsdbjDyTRq+51ds fxvPX8NkycPQc/Nt5m9BuV06EnGJjcPp7JGXpTkNnTGdJcBqKxLRSsPOl1ESyRouZYEA fE7NjczwXRbNq9orRsuP06AAbodsF84V2KP3HSFHn0CcxSmAkZKcAtVnMajGInGwb6QB nmVtgTo4759d/RmZBRXhExMBQNkgBVRJXl9Nssip2nmJcVDMWUh+W9ohdDvsdVQklUa6 +P1w==
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=EPSkHIOZbQW3C5BLerJqq+hTy0Pg/3pTL/4xIVor770=; b=dFTQcBfvqse2jH+dGNdOqVxVmqzGLVm9fS42kINsu0pQYjDh1PmHQifL1Df3wlehF9 cIMpYkksOnCDap+B0bJo3t1Dc+d+nqOUsCM6Ebn4rldQxhWiNbFGaI/AXABkkg8BZAW6 k5OerucNEYBa4o0u+pwynzi1gpDwdglCg5gzWx52Wx2NzuSet+d5yCJ8pjvnvh9iRVMw 541KdmCSMifpRSS0sCvBuY5mgiDFZthvvJnyWWf3E9WhklgGw2Lotf/z1clr2WMRRuiP uCE/nB6nHZDlL2RktWpLu3GIloZbml36vTzC/DVuKQz4ZhqApRno1tyLepVlD/+RZjMR j2YQ==
X-Gm-Message-State: AFeK/H0v20RJGI4Hq5hq8T/B0OrhW9XOAzTzoyfd1mZxUimaAFGSeS6apA2lKEMcZZtCuJheOtwOe1ZYdhMl0g==
X-Received: by 10.200.52.135 with SMTP id w7mr24741613qtb.136.1490679037885; Mon, 27 Mar 2017 22:30:37 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.12.141.207 with HTTP; Mon, 27 Mar 2017 22:30:37 -0700 (PDT)
In-Reply-To: <2978391.eJVbVTHBlo@kitterma-e6430>
References: <CANtLugO_D1Mz_v_341pc5O1mZ7RhOTrFA3+Ob5-onp72+5uRfA@mail.gmail.com> <alpine.OSX.2.20.1703272118210.2533@ary.local> <CAOj=BA0YKHYrkseR=wwgZn0_GNBKfdL7jmHehgBRzxqGKV6C1g@mail.gmail.com> <2978391.eJVbVTHBlo@kitterma-e6430>
From: Peter Goldstein <peter@valimail.com>
Date: Mon, 27 Mar 2017 22:30:37 -0700
Message-ID: <CAOj=BA2TUrJ+Ci0WBincwXqJYUjtffvWxkXktK+VbQ-QcKSFvw@mail.gmail.com>
To: Scott Kitterman <sklist@kitterman.com>
Cc: dmarc <dmarc@ietf.org>
Content-Type: multipart/alternative; boundary="001a1141a70687464b054bc3c224"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/o99GJU8EwM0pSEXGoTpFYn10opU>
Subject: Re: [dmarc-ietf] indeterminisim of ARC-Seal b= value
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Domain-based Message Authentication, Reporting, and Compliance \(DMARC\)" <dmarc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dmarc>, <mailto:dmarc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dmarc/>
List-Post: <mailto:dmarc@ietf.org>
List-Help: <mailto:dmarc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dmarc>, <mailto:dmarc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Mar 2017 05:30:42 -0000

Scott,

Header reordering is irrelevant to this discussion - the ARC RFC specifies
in some detail how to construct the ARC Seal from the AMS and AAR headers -
https://tools.ietf.org/html/draft-ietf-dmarc-arc-protocol-02#section-5.2 .
And the AMS headers have the same behavior as DKIM - header ordering and
canonicalization is also well-defined, so header re-ordering doesn't impact
the signature.  The discussion at hand is literally about the ordering and
formatting of tag/value pairs within the individual ARC headers.

So the only brittleness question is whether existing mail infrastructure
will potentially alter the internal structure of the AMS header or ARC Seal
header.  That is...unlikely.  We can conclude it's unlikely, because a
similar alteration of a DKIM signature header would break the DKIM
signature of forwarded email.  So if DKIM generally works (and it does), we
should be able to conclude that specifying ordering/formatting of the
tag/value pairs in an AMS/ARC header does not represent an increase in
brittleness.

I'm not really sure I understand the point regarding the # of test cases.
We're not worried about keeping the # of test cases small - we're
interested in ensuring that the same test cases will run successfully
against any valid ARC implementation.  Can you please clarify?

And yes, something will probably be developed in Ruby at some point - but
it's just as likely to be a de novo effort, as it is a modification of an
existing DKIM gem.  There is only 1 pure Ruby DKIM signing gem I'm aware of
- https://github.com/jhawthorn/dkim - and it hasn't had any updates in 2+
years and lacks verification logic.  So it's a less than ideal basis for
developing an ARC gem.

Best,

Peter

On Mon, Mar 27, 2017 at 9:49 PM, Scott Kitterman <sklist@kitterman.com>
wrote:

> What's more difficult to is identify all the ways that things get
> reordered,
> mangled, etc as they transit the various elements of the mail architecture.
> If you over specify the allowed order, aren't you risking increasing the
> brittleness of the solution.
>
> If test cases are automatically generated, then they are cheap and we
> shouldn't worry about unduly constraining things to keep the number
> small.  As
> long as, at some point, the test cases are validated against multiple
> implementations, I think it's fine.  If you've got a handful of
> implementations, then the risk of them all having the same bug is pretty
> low.
>
> In addition to Perl, I'd expect something in Ruby to appear in due course.
>
> Scott K
>
> On Monday, March 27, 2017 07:54:43 PM Peter Goldstein wrote:
> > John,
> >
> > I'm familiar with the definition of the FWS in the ABNF, as well as the
> > generic definition ABNF for message headers.  I'm also aware of the
> > challenges with trying to normalize such headers, and how that can impact
> > email authentication - breaking forwarded DKIM signatures and such.  But
> > none of that is actually relevant here - we are not interested in
> arbitrary
> > messages.
> >
> > We are interested in creating a set of valid input messages and ensuring
> > that these messages are signed in a consistent, reliable way by any valid
> > ARC implementation.  This is an extremely narrow case - so yes, I do
> think
> > the above is basically all it would take to make such signature headers
> > identical.  Perhaps I'll be disappointed, but based on the sample
> messages
> > I have on hand from existing implementations, that seems unlikely.
> >
> > As for the hypothetical developers who will be adapting DKIM libraries to
> > do ARC signing, we've been talking about them since M3AAWG in October
> > 2015.  So far they haven't materialized.  Honestly, it's not even clear
> to
> > me that there are that many DKIM libraries out there to adapt.
> >
> > Instead we've seen ~5 implementations (Google, AOL, Dkimpy, OpenARC,
> > MailerQ), with potential support for implementations in 1-2 additional
> > languages (e.g. Perl) probably driven by one or more of the implementers
> of
> > the existing implementations.  It should be relatively easy to coordinate
> > such a change across the small number of existing implementations.
> >
> > Best,
> >
> > Peter
> >
> > On Mon, Mar 27, 2017 at 7:21 PM, John R Levine <johnl@taugh.com> wrote:
> > > I think tightening up some currently allowed ambiguity in the ARC
> > >
> > >> specification is a much simpler and much better solution.  I'm not
> sure
> > >> why
> > >> there's such concern about canonicalizing the format and ordering of
> some
> > >> tag/value pairs.
> > >
> > > If you think that's all it would take to make signature headers
> perfectly
> > > identical, you will be deeeply disappointed.  (Take a look at FWS in
> the
> > > ABNF and all of the other generic ABNF for message headers.)
> > >
> > > I think what we've been saying is that the SMTP mail ecosystem has
> never
> > > tried to make stuff bit-for-bit reproducible, and even if you could
> hammer
> > > on the spec to make super strict rules for one particular header, it's
> > > unlikely that the people who are adapting their DKIM code would pay
> > > attention.
> > >
> > > R's,
> > > John
>
> _______________________________________________
> dmarc mailing list
> dmarc@ietf.org
> https://www.ietf.org/mailman/listinfo/dmarc
>



-- 


[image: logo for sig file.png]

Bringing Trust to Email

Peter Goldstein | CTO & Co-Founder

peter@valimail.com
+1.415.793.5783