Re: [openpgp] Message padding in OpenPGP

Justus Winter <justuswinter@gmail.com> Fri, 27 September 2019 14:03 UTC

Return-Path: <justuswinter@gmail.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 810A4120025 for <openpgp@ietfa.amsl.com>; Fri, 27 Sep 2019 07:03:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 igOYLYaO_0aN for <openpgp@ietfa.amsl.com>; Fri, 27 Sep 2019 07:03:42 -0700 (PDT)
Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 5DA48120052 for <openpgp@ietf.org>; Fri, 27 Sep 2019 07:03:42 -0700 (PDT)
Received: by mail-ed1-x536.google.com with SMTP id p10so2461861edq.1 for <openpgp@ietf.org>; Fri, 27 Sep 2019 07:03:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x8lc6xlSZxUqRMmtTWFUG/eziJzOU6+nWTbeDktdWbU=; b=Ezz6qbqct1/LfMGa1i1RV2drM5qlbrTxHEZCzUcOZ2LybEY1QOodBhuslyjT2EmPVA xMkKxZmM3eFEqSWt3t3WHmTXP3mPHqY7R9h18O2qYXa8rhEsD4U7o5yHNNYUz+EDtkV0 Ma2add5JY5tTch2bcGKhaae4Yh3yZKo02T6O2pwUEz4gZuQ+aImj1HMGXAXerl+jmWaS rSbpLROTQwUm7DX1fwy5Ii7fMt5wyymCFoNh6aK2MKppVbPkN2GUS+mhIQI00Cwco5BR ak3NMHi418bCP0c62PG7wLyfEBMiLJrBLodXup0xWCm24/0sv3FC0zWq/aY/7PHiiUnD lzyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x8lc6xlSZxUqRMmtTWFUG/eziJzOU6+nWTbeDktdWbU=; b=O7r47iTxfkTjM33N1r0caXJAH8PTu5BHtJP1/XVlJ2ZM3y2IDsClP4TBiuDFv7YfIr mNOmDwlgmUAZEE1a/+JrCMmYUpNSKU8/XI87oPKHNuBz3g1HioJabyN2EpF0NJFPfpRL 6R4Bdbo4Xg7DUG1wThmUgFcxQfswi688sykLsfsX3QDPGgYvBhLt/FgfgIPXh6C8aesv Q/vPd5Q+TdnH75xV+nb8bO5GpYjYQeiCZTrD92YQj8V+nii+Eu0lN15OpTIzMdlsxVrs y3BQXFuKH67U/iiLJgDRUsHWzHnvs0KPz+MnUI4bAbJ7+7XARoH1cdQ3Puiiji9TbenU APNw==
X-Gm-Message-State: APjAAAXWbGbrfkBTN9ZyEZ2m0/Y2EBm5tjnZAOGZtEzp9zA/HKmDioBu 20BSjZW6YwJnitWqkbCZuVv8paymoenOWS39ZfE=
X-Google-Smtp-Source: APXvYqyVv1i8mmmmhayp3QEXCB5DrrN1xomm7lCGTQMN4blkpltepKaUkvCO9TxmWiloiMOivjqorHyyq7Az5j+uWCk=
X-Received: by 2002:a05:6402:383:: with SMTP id o3mr4736890edv.205.1569593020948; Fri, 27 Sep 2019 07:03:40 -0700 (PDT)
MIME-Version: 1.0
References: <CA+t5QVsZoWEuDWEzGn+mWNsx+giJsq+9pYptt3TfffASBVoGsw@mail.gmail.com> <8994782B-12D6-4B91-BA7A-1BF6BF4E7951@icloud.com> <CA+t5QVs7aoyBotbApmGQBGO9otLeB9knccAV8w9MacjrcE_51w@mail.gmail.com> <sjmblv8igzi.fsf@securerf.ihtfp.org> <CA+t5QVvBxvhrDLuXiy6uM93HEp5rtOhwb3yQYr=v9FNKodCnjg@mail.gmail.com> <sjmtv8xhn0a.fsf@securerf.ihtfp.org>
In-Reply-To: <sjmtv8xhn0a.fsf@securerf.ihtfp.org>
From: Justus Winter <justuswinter@gmail.com>
Date: Fri, 27 Sep 2019 16:03:29 +0200
Message-ID: <CA+t5QVuXb0R-C_YxuBa5j2B+6EiEJvU5fj1qUMhzAae3PVeyzQ@mail.gmail.com>
To: Derek Atkins <derek@ihtfp.com>
Cc: Jon Callas <joncallas@icloud.com>, openpgp@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/0uX4tHsnxLdQtuoEUr__V1N01mE>
Subject: Re: [openpgp] Message padding in OpenPGP
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Sep 2019 14:03:44 -0000

On Fri, Sep 27, 2019 at 3:44 PM Derek Atkins <derek@ihtfp.com> wrote:
> Justus Winter <justuswinter@gmail.com> writes:
> > On Wed, Sep 25, 2019 at 4:32 PM Derek Atkins <derek@ihtfp.com> wrote:
> >> Why not just have multiple literal packets inside the encryption?  I.e.:
> >>
> >>   ENC{ Lit1{realData} | Lit2{pad} }
> >
> > Because that is not a well-formed OpenPGP message.
>
> Neither is anything else you are currently proposing.

That is incorrect.  Please do go back to my original message and
re-read it carefully.

> If you're going
> to extend the spec to add a new packet type you might as well extend the
> spec to allow this, which is easier.

I was explicitly *not* proposing a new packet type.  And I do not
believe that extending the spec is as easy as you make it seem to be,
and extending the spec doesn't help existing implementations.

> And honestly many parsers (at
> least the parser I wrote in 1995 which AFAIK is still in use by at least
> one implementation) will actually parse this structure properly.

I bet that your parser from 1995 will correctly handle the padding
mechanism I proposed, as long as it is able to deflate compressed data
packets.  Please do actually try that, I'd be very happy to get some
feedback.

Cheers,
Justus