Re: [TLS] Comments on

Watson Ladd <watsonbladd@gmail.com> Tue, 18 February 2014 05:00 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3B37E1A05B1 for <tls@ietfa.amsl.com>; Mon, 17 Feb 2014 21:00:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 ODg9dbiVKnaW for <tls@ietfa.amsl.com>; Mon, 17 Feb 2014 21:00:30 -0800 (PST)
Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) by ietfa.amsl.com (Postfix) with ESMTP id 7B9551A055A for <tls@ietf.org>; Mon, 17 Feb 2014 21:00:30 -0800 (PST)
Received: by mail-yk0-f173.google.com with SMTP id 10so32195340ykt.4 for <tls@ietf.org>; Mon, 17 Feb 2014 21:00:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gIv0nPkYPTuBzYMQ06746F6ieGVUy81Mr9RtvtZp3iQ=; b=h/aHQ4ZeQnxcspZksxxH6lQHwlF2osYzyhbc0VekomBa+Nx7w2uKYesZA1c3C396z2 Ieh1NfucfXZ7I5EBW31dz6nAY4Rxnj9aO1wHX1lHrwA8wpIgatl9snRljbm/2WnM3YC0 CPnfpYLyOtp0mi0jf+TO7Mm/6RwPUOzYZkr+ABUL4O7VXJkvayeAl931SWAQlesCHIKx 6lhb6WDcy6eN3dFAyAP+AYQoc8vixxdfpusdVBxmBTIDooMd1eyl4st2aHxXgRksnMri jmAGTsJIpvTqjVvo0ae/B8JaTdCiHQfWmrhdNLEEOmvodqgodA6QxNR20dnt8jKXGy2a /EsA==
MIME-Version: 1.0
X-Received: by 10.236.135.172 with SMTP id u32mr1321963yhi.107.1392699627686; Mon, 17 Feb 2014 21:00:27 -0800 (PST)
Received: by 10.170.92.85 with HTTP; Mon, 17 Feb 2014 21:00:27 -0800 (PST)
In-Reply-To: <CAMfhd9VzWwR1tepdMGVUFGDm=skHT_NHSFPPySdN1z6vMeLUcw@mail.gmail.com>
References: <nnha83nwy9.fsf@bacon.lysator.liu.se> <CAL9PXLyWhqSdG5YRyrOprW5wgCYCwHn7_a=R2sb+mN-irkMYbA@mail.gmail.com> <nna9dum6fk.fsf@bacon.lysator.liu.se> <CAL9PXLyC98rc73x7o4gDeu-UBz1k0VP_qTdbCqgSSObuKf9+LA@mail.gmail.com> <nnsirlldyf.fsf@bacon.lysator.liu.se> <CAL9PXLzgHqguYfKwhiVyjDeSCUkqwbsoujAcz8UPN0FQyfaodg@mail.gmail.com> <1392624588.30995.10.camel@dhcp-2-127.brq.redhat.com> <CACsn0cncSn61Z3FkbcF_S32mah=3DtNkygHMB31+_UgQr6n5Ag@mail.gmail.com> <CAMfhd9VzWwR1tepdMGVUFGDm=skHT_NHSFPPySdN1z6vMeLUcw@mail.gmail.com>
Date: Mon, 17 Feb 2014 21:00:27 -0800
Message-ID: <CACsn0c=-HfmgzZ=d=kRkQJ1UtS3xPFEJa3vASjwakDUpbGpLsg@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: Adam Langley <agl@imperialviolet.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/Cm3Cq1nGJR0uy-U26cvSsfFwcZ4
Cc: Niels Möller <nisse@lysator.liu.se>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Comments on
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Feb 2014 05:00:32 -0000

On Mon, Feb 17, 2014 at 6:05 PM, Adam Langley <agl@imperialviolet.org> wrote:
> On Mon, Feb 17, 2014 at 10:45 AM, Watson Ladd <watsonbladd@gmail.com> wrote:
>> Alternatively, we can
>> encrypt the entire file as one big chunk and decrypt on receipt.  I've
>> still not found a case where one of these doesn't work.
>
> I don't believe that there's any disagreement about the fact that
> operating on the file as one, large chunk works, technically.
>
> The problem is that I believe that it results in dangerous APIs. For
> example, OpenPGP does this and I was very unhappy about it when
> writing this[1] implementation which returns unverified plaintext. I
> called the Reader "UnverifiedBody" and put a big comment in there but
> I think we should be able to do better. The point of AEADs was to
> provide a safer abstraction in the first place, no?
>
> (Niels suggested buffering everything before returning anything and
> that's certainly safe. But I feel that it's somewhat anti-social for a
> library to do so.)

I don't think there is any way around that. If I want to ensure all
read data has property P, and P depends on every byte of input, I need
to look at all the input bytes before revealing any data.

Sincerely,
Watson Ladd

>
> [1] https://code.google.com/p/go/source/browse/openpgp/read.go?repo=crypto#38
>
>
> Cheers
>
> AGL
>
> --
> Adam Langley agl@imperialviolet.org http://www.imperialviolet.org



-- 
"Those who would give up Essential Liberty to purchase a little
Temporary Safety deserve neither  Liberty nor Safety."
-- Benjamin Franklin