Re: [openpgp] AEAD Chunk Size

Ronald Tse <tse@ribose.com> Thu, 28 February 2019 00:35 UTC

Return-Path: <tse@ribose.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 5E8B4131200 for <openpgp@ietfa.amsl.com>; Wed, 27 Feb 2019 16:35:25 -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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ribose.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 rEGGjFbd9pz2 for <openpgp@ietfa.amsl.com>; Wed, 27 Feb 2019 16:35:23 -0800 (PST)
Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-eopbgr1300089.outbound.protection.outlook.com [40.107.130.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0CF571311FF for <openpgp@ietf.org>; Wed, 27 Feb 2019 16:35:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ribose.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zp0Jo4Iz1RRbWVZtxzB16/VFadn7eluznHUdwn6debI=; b=u3h7vwz6p6zgFtHIUe5jm/gbaeNMUlQwQ0nbgAEoiyzG2QFKrnzNAke4ZLemxRlg+M5Gw0uDixfh7VbaAbE2WfL/8yZ7B3ddBlZi8zuGDTGprGOSVuE0RArr1QOIxcUxFRyDpnL0wqFgNQs+gLgv5M6D+akoT3gI0Dd67tGWrhM=
Received: from SG2PR01MB2776.apcprd01.prod.exchangelabs.com (20.177.169.82) by SG2PR01MB2743.apcprd01.prod.exchangelabs.com (20.177.170.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.16; Thu, 28 Feb 2019 00:35:20 +0000
Received: from SG2PR01MB2776.apcprd01.prod.exchangelabs.com ([fe80::79b5:927d:1203:98cc]) by SG2PR01MB2776.apcprd01.prod.exchangelabs.com ([fe80::79b5:927d:1203:98cc%4]) with mapi id 15.20.1665.015; Thu, 28 Feb 2019 00:35:19 +0000
From: Ronald Tse <tse@ribose.com>
To: "openpgp@ietf.org" <openpgp@ietf.org>
Thread-Topic: [openpgp] AEAD Chunk Size
Thread-Index: AQHUzop/kFDDrLByAk23BDwcx/qYg6XzgT4AgACqBYCAABGnAIAABmWAgAARlgCAAAj9Yg==
Date: Thu, 28 Feb 2019 00:35:19 +0000
Message-ID: <6A3FD8B9-7957-42CA-A704-A2C983A52BB3@ribose.com>
References: <87mumh33nc.wl-neal@walfield.org> <F9VLV9HZWH.3RYL3UM3BN873@my.amazin.horse> <3WZ7-hy9V7TOy53p1gP5EXELzHJIqjouV9x0YTN3PWsBZedKkqvVCRm-2XzGZy-FYAYdTqP1-7YV4wbTWMWAYhSujQA6NmrnIuXfZLRHkdQ=@protonmail.com> <CAB941EE-6961-4CAB-9632-DFF738980467@icloud.com> <HBifY5kv2OqoajWurbHh_-NyZaBUZGabUpbxfhLlw8lTEuJVAiaHr-hhL_v5jKI-uqfeTIKD2S8VbEKvImC2sxhSlxD3GsT8LBzXKaOeHLI=@protonmail.com>, <431339C1-8DDA-47D0-B233-9B7F49F0692A@icloud.com>
In-Reply-To: <431339C1-8DDA-47D0-B233-9B7F49F0692A@icloud.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=tse@ribose.com;
x-originating-ip: [124.217.189.165]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: ec666a87-03ed-4336-7e88-08d69d149e48
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(7168020)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:SG2PR01MB2743;
x-ms-traffictypediagnostic: SG2PR01MB2743:
x-ms-exchange-purlcount: 1
x-microsoft-exchange-diagnostics: =?utf-8?B?MTtTRzJQUjAxTUIyNzQzOzIzOld4MGpJQWZGZzlOU0dhNEhIMFc2OFpKVFVa?= =?utf-8?B?TUsrT0d2cVY5YzNGdGFLSjA2ZmJMTE1oUnA2STk5OU56YVVJU1ZlWWtEQURX?= =?utf-8?B?dWlkWVJmWWNtK2ZObVA0MWNtTmE5bzBsZTNIUS8vOUpzdWNsU2tRdHhGbU1J?= =?utf-8?B?SDQ3aXp2cWg1TzBYY21TejZWYXlBVlc4dmxib0NueGdoUUNLeWZtMmlFQ3k5?= =?utf-8?B?eG55dXlwc29OdEVBVkJrU0pwWlQ2RzJKM2dMTC9RaGM1dWxZQ2JvZDI5ZnVh?= =?utf-8?B?R0dCUG1rYWFEQmNBR2xhOEVxZkJFRldtWm5NNC95YzVSZCtyOENnVXFjQm90?= =?utf-8?B?bHVFMnVadXl2bnpHQTVJR3RNcFJRak9kT2tXV2t5RnhhWEhrekN4VTBuVjU5?= =?utf-8?B?TkxIUE13WjB4czBOSnVmSGpDQ2l5RVk2MW5jSU03bG9YVmJwQzZlREhyR29R?= =?utf-8?B?Zys4M2RiNVBiLy9MUkpzb1RtWmxzQ1RMV0VBbTNLMnBoZHA3cnZGUEh0dGU0?= =?utf-8?B?NG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EQ3K0h2bXU1?= =?utf-8?B?UGlNNWFDLzJBdUxiWWk2MU5lM1l5KzVJdVhkY2V4NHFXQnJuT2dEWDdDY2Er?= =?utf-8?B?LytXNjgzeWtDMWdmVXNwakRhTHg1S1N2UWpLSVYyeThQNW5kMmczK3pJZ3VZ?= =?utf-8?B?K2N1ZXNSRmpaK3BHMDlHMElhWnphV21WbGFMUTBpcmI3TkJUbVcydmh0WGsy?= =?utf-8?B?R1lRTGFCZUo2c3duMzFVMjcwbmdMSjZyekt1NndoNTJyZGJIUk5jckpacmNU?= =?utf-8?B?eERoUDh3Y3owaGk3eWxBNll2V3JkV3Boc1B3dW1uR3VzYUdUY09ubDJ0ak56?= =?utf-8?B?bm1RSnRTTitZMk85R1NWREJ1VzhXekVHRzUzQTVLRkNuL0VRNnRRNjEzemk4?= =?utf-8?B?UXVZVFQ3RUxsQW5TOFFSaXg4SXpFR2VqTEtwMktCMU41L3I0RmwzT0hHMm4v?= =?utf-8?Q?PioyG12pWL8n62e4nfj8GYw2oXUh5Sox?=
x-microsoft-antispam-prvs: <SG2PR01MB2743EC17A3FBBFAE979D73D4D7750@SG2PR01MB2743.apcprd01.prod.exchangelabs.com>
x-forefront-prvs: 0962D394D2
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39830400003)(376002)(346002)(136003)(396003)(189003)(199004)(86362001)(446003)(6116002)(66066001)(486006)(229853002)(14444005)(68736007)(2616005)(256004)(36756003)(71190400001)(11346002)(5640700003)(2351001)(3846002)(6916009)(83716004)(105586002)(8936002)(106356001)(476003)(25786009)(71200400001)(186003)(6486002)(6436002)(966005)(8676002)(5660300002)(53546011)(97736004)(81166006)(2906002)(33656002)(508600001)(81156014)(2501003)(6306002)(53936002)(6246003)(55236004)(6506007)(305945005)(99286004)(14454004)(76176011)(7736002)(82746002)(26005)(102836004)(316002)(1730700003)(6512007)(93886005); DIR:OUT; SFP:1101; SCL:1; SRVR:SG2PR01MB2743; H:SG2PR01MB2776.apcprd01.prod.exchangelabs.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ribose.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: nZMc1ljv23VJYI73V76O1xYos0gJ3SsoYUhYuMP5ti2jFNDR9b2ZSctKL/2AzAdukus33pt4G8tpnGzMztW5kPQHZ3XCPdZokUk/1Vd+h7PgBaGFXfFjetPUp5xAEDyYQuT0ufsVy3Hzzlp8PQG0Wj0VykPsmjNL7wZm4BhI3zmIlu978XQpaw785X7t6qC0P/Bjeo7OX0D3RJiBgzfBzOAZadkoBWD588UEwlEEfcg6TejIVxJ9Eb+sRx74/vUE2PDclk5cblby5aRJnUyM1zQswh7noIQo0Xhq6BKyO8p+5TfveZpyKem/uj1je+jzGJdOFkzmk9ob3uLnJI4lqFpn2X8PUGD3DpkY/MfBLygYg8xsZd/A6Yh4gaOAg2aw1QGEmgrmkWVZFwNA3UfQRAigzEjA24wv2WTGYe1KC14=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ribose.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ec666a87-03ed-4336-7e88-08d69d149e48
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 00:35:19.9561 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: d98a04ff-ef98-489b-b33c-13c23a2e091a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR01MB2743
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/Te9BLOUT6QCv3hUOCSXDTMJ_A6A>
Subject: Re: [openpgp] AEAD Chunk Size
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: Thu, 28 Feb 2019 00:35:25 -0000

And thanks Neal for the suggestion!

_____________________________________

Ronald Tse
Ribose Inc.

> On Feb 28, 2019, at 8:03 AM, Jon Callas <joncallas=40icloud.com@dmarc.ietf.org> wrote:
> 
> 
> 
>> On Feb 27, 2019, at 3:00 PM, Bart Butler <bartbutler@protonmail.com> wrote:
>> 
>> Hi Jon,
>> 
>> Do I understand correctly that you oppose shrinking the allowable range with MUST at all too? I think the argument for this is fairly convincing from a usage perspective to ensure that someone decrypting a large message is not obligated to download a huge amount of data before finding out that it is corrupted or otherwise has been tampered with. Likewise, we had to address unanticipated performance issues in OpenPGP.js with very small chunks which could have allowed a bad actor to essentially DoS the library with a strangely-constructed message.
>> 
>> In other words, I'm not really swayed by the implementation simplification argument but I do think that very small or very large chunk size, in addition to *probably* being useless, pose a real threat in terms of abuse.
>> 
>> So I think having a MUST for the range, maybe 16kiB to 256 kiB, or 16 kiB to 1024 kiB is a reasonable thing to do. And as long as we keep the size byte, we can always increase the upper limit of the range in the future if needed.
> 
> My warning is against shooting someone else in the foot, or forcing them to use some other protocol.
> 
> Thus, saying (e.g.) that the range MUST be between 1K and 16K is a bad idea; we even know now that 256K has in some cases an efficiency advantage. You can say, MUST support 1K to 16K, SHOULD support up to 256K and MAY support larger sizes. There can also be a couple of paragraphs to explain that there are good reasons neither to be very small nor very large.
> 
> My concern is someone saying something like, “Gosh, I’d like to have OpenPGP AEAD encryption for S3 Objects, but I can’t ‘cause those go up to 5TB.” Anyone who’s going to use 5TB objects probably knows the headaches they inherit and yeah, you aren’t going to do that on a Cortex M0.
> 
> Does this make sense?
> 
>    Jon
> 
> _______________________________________________
> openpgp mailing list
> openpgp@ietf.org
> https://www.ietf.org/mailman/listinfo/openpgp