[jose] Re: Add AES-OCB mode?
John Mattsson <john.mattsson@ericsson.com> Mon, 29 September 2025 03:53 UTC
Return-Path: <john.mattsson@ericsson.com>
X-Original-To: jose@mail2.ietf.org
Delivered-To: jose@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id EC1926A58F81 for <jose@mail2.ietf.org>; Sun, 28 Sep 2025 20:53:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.096
X-Spam-Level:
X-Spam-Status: No, score=-1.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_NONE=0.001, URI_DOTEDU=1] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=ericsson.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQMCJFIsQ_Rc for <jose@mail2.ietf.org>; Sun, 28 Sep 2025 20:53:17 -0700 (PDT)
Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013037.outbound.protection.outlook.com [52.101.72.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id D49FF6A58F7C for <jose@ietf.org>; Sun, 28 Sep 2025 20:53:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fj6gNu1EO52zL8E+vOjqUfEAiOk7rZH/F52ye4HXe3KcRYnH8w85robJOC01qP3rBX+keC/t+kPRAjOiCtsbNQSzbgWd/cHjzU/6202biZpkB2FwWYIoWhZAd1o6CyxDK6QPGh84aT2XKTFiwCIMf81MIKIekGVPfArh0cW4Yj4ASznoF+WX049g6kUYZ6eetY4u3+5mJBp5kQsENxciwnfQLQPumm6Es1+sw9yDuDRFIbFpIqstVgoJNa+9+43aSfGCjnWbi3hQSU7HuIkgCOiVQQcsMRgH7z7KZGDRHoBiwHXWpEUzgfeEPuIIfku8t5Je7jvP5gEHNUhOHBZCVQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Dq+qktiNR8umUU6/5DFCQaR1dA7sNvozgkMYnimcoxU=; b=W9Pq4ZKlttYA6BTIOvURuZzby6Q4W+OcjpIGC2t+gC3pT9KXdL2P1n2YIU1s+4Ji5+bawET/i4b4vmDJnp4gf0l3xbvbRozdJ6yu9R5cI6bKwkdGMBHAKVrVjb8fSg3HTAEdXrLUmndDTdqaq4EopyfU+hoXp1NZJqrw6asi+wAy5oVsdWsBf7Leux0omDQUOpri3Q0xAy8dpLcylLvuabnRSdv+o/LZQF9bt7aTC+ZEn7U+7uFsfseTls3nPPAR2yxZJFFKBwJMxuEMYl76M2UJoypCmdJT/V4JSdlFxz33cDZILPG+21Xwdy6TpmUGhm/2ooSRLJFBSIZDotc+Bw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dq+qktiNR8umUU6/5DFCQaR1dA7sNvozgkMYnimcoxU=; b=rCdNbSnATaOjXNF3s6GTO+1qDXApuiazEKJ7sXsDwRRsdZaQOu4fQKeOkKIopAQw9mCBPyJ9QkkxJUr1Sk75RXxLb6dvMD9SU5638KaNctE93z7JsJxKsvkzwOOCzoL/fVJJ7X2NDta7PPA3AHHiR2VwxTaB+aRqiFg6fN0eE70B3L3BRdu3KAEl6imet8iCZmxU86TDIyVyRtGoaGRIXcnDNl8tsCwq8Ak7atSM1j3utLz6Kvk6gzeZ2W39lcJDf497pkpVIOtm5PqrdRr6nRQY6K52KdlJpToYJBYyNbt9uQE/koOz7b4dJhWktbEWaqOYDAXv8YBtyDT8CMmaDQ==
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com (2603:10a6:150:114::10) by VI2PR07MB11008.eurprd07.prod.outlook.com (2603:10a6:800:2e1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.15; Mon, 29 Sep 2025 03:53:08 +0000
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::bcf3:3f45:888e:a4b8]) by GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::bcf3:3f45:888e:a4b8%3]) with mapi id 15.20.9160.015; Mon, 29 Sep 2025 03:53:08 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: Neil Madden <neil.e.madden@runbox.eu>, Phillip Hallam-Baker <phill@hallambaker.com>
Thread-Topic: [jose] Re: Add AES-OCB mode?
Thread-Index: AQHcMKktZDzaZw3OqEOitFrQGdnyCrSo++mAgAAHKwCAAICpjw==
Date: Mon, 29 Sep 2025 03:53:08 +0000
Message-ID: <GVXPR07MB9678259E45FDB02947AF9C40891BA@GVXPR07MB9678.eurprd07.prod.outlook.com>
References: <CAMm+LwgfhyciLkzsWqX=Qqb-40=ia9a+ESEa2A9p8PNY9PUh1g@mail.gmail.com> <F0AB9726-A62E-4AA9-B358-44A344AC5894@runbox.eu>
In-Reply-To: <F0AB9726-A62E-4AA9-B358-44A344AC5894@runbox.eu>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-reactions: allow
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: GVXPR07MB9678:EE_|VI2PR07MB11008:EE_
x-ms-office365-filtering-correlation-id: 05399e35-0005-40f2-643a-08ddff0bb410
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|38070700021|13003099007|7053199007|8096899003;
x-microsoft-antispam-message-info: or0agMJnQ2CJT/GUu8kw1CdDKqhvh0pnonc+ezePxfT+t9FF+jEVGR23q9fLchWadkoo68Arwg5HLKSPjynlUOO2vWQZBBRP84GDR/5EcHwhbZWvfYwGwZFQC4GdL3r5d+JLE+qe9KQQfr0sjstPZWQt64SkUggFrJ2HuTHHOBL7WRzRqx6Ft8+GUza1kDbQ3xytW1ZMhAn2QLsWfxsJeOT3VWhQv1EGGxtcnng1yr2ssf+0yNlMZ9v6KjO7Cu0WWaVpXeJQwDtrl3EJJ3NXbrmVuynTi5gVOyLEcisBRC9/S0/q0W83GbBDPFIyqbp4q7dC5INSnw1RQsJ1qW3Zl+RElRB4EVq3vzipf/eOPZudAWM2BbMDyYcc2LqVoGno27k/6w09qdd6lnSmruVLMuV96rf5aoNMOpzibok3Cr50erG8oOZAlMfu4BganJJqHze7V2AXcefDyI4Fw0okj+pL9nJ7Bs8VYPyHqxjndFbOQZ7xLHZrF0NrcYMMYVdqBmLho2ESQkYvwuTgh+w2xS94Itoq5KFCQ6D2TSqyjf+fcO1EPec/8ixbQ7KgGnMXjPy+2+NKRbRapT5kkBjEFYe2g9cp9HgV4rQgqRSpHcDBtv3mvCo5AFtk7TwjrP9TQv7wUmIYvr3NmaO5kVIrEIX0zNaeFfORAryboLyUAR8Ebn9AtzFPfZfJ7sUcUr/CQPfa91BrtKQs2jGgKRjEtC58fWtj5Ex8WLmRcDSwFK+7txisgF6KMaAdfkkWHZaiGMiaNyxi2qfQmUD6mlGFGDcicsUp/dh1+f4CbYD5EV8gVndPN2L8GX/qeWHT3DTWrcg7iRdQdDyQrSDf0qXpApvAaaY00ttAKEpGoqNjcAvSDrix/+MPCoej1sUy+HJmelUv7C2W63hJK80e9YpzhYbd7xetUpFILJ7sZ96Y0C+KPqSUC2Irwvp0V66qqMZ3H1Z5PL/TChkD3sfN0k5zdMxvm1LYQHmTd9VRqRoR+LHBPl5pWFUBcfQPz9hwdgYfhpeuS0RCoOQDxaVaAs5BkvZOHkUHREXWraGq78GunjOv7+W/uz0C6t3ddM89uZVmv8Qg/hJIGTKGZWLtAy39lIIfoSXTRwuZMJVKkYaZoAAZ2kCv8JdRrEMndM42hhN78gldX0T65uSXcnwAQqGgEBYl0aAShkDjgY/U8ke2CPk7juxOpA/Vb+hNzPmSngA8e2oBnqSkPTd5NcZL2Zuic1eabd2WPL01IkWqg7kFOEQKcTrrneNyJ2+y54HLtJUeaUn6DxMmnWVVZQvTRc19DVeyLtKPG7hYkHDb6pNIj6xDi8Zgxv4Hn9hOSMI9T8wQaXxA46pPXKLX9gt6oxE6zbQIx9MhLq1znn9cYo5d3X0WXZc20pextYPhMVh3i1dQ7HoiAxVOi900PsCEIL4vpXB/XMWaoFb0vPQtNQmJkuepMocGGT2pignukaSxXKBv
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GVXPR07MB9678.eurprd07.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(38070700021)(13003099007)(7053199007)(8096899003);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: P6iw3fzltM9Hu8hKKId1qq0G7zlP1fec7RS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cXxg9otoHjCeumlhV8w6ohYVHXKgtm0Zr16g246bvAdzivdn/ejm57+cV0vxI3bqnfSNonE6fzJZI5h3mNxT6l0ODULsip7GiMy0MLan5P8kyWy3vUNXVE1ARnstYF/CYBZW0F8DSQAUxGItYjtRW1ozZv2bIlT74PjR1qwY7XN7af5kRhEgiHbQl9llUnZ8FUxAlRGDcku9YkbsfMJZQQoSKitc+XN9UL+SMzP2tI2mxXCX99QhAf6j8SC2KqBKyCUYmg8i8mhkLLm3XAiDelcohBTehO3Zx7eytH8ZyXWhCCJVGJ2Ve0FjKRVhkl28FeuMZO+7OgBi4XShGKaivh/Dso5nTO/HMow2im2HLQhriluD3POAlvp5ZFbFtbvlgunzyUam5lSbRZacHPKboMlxQMhdPj06iL9Cfy/P8mpxHBLrx4eVyEGRTLjUke1c4ak/2TTsFKbVhWp0zPewWjZP6JO076xWvZtQYUq7FqzzvqpavqSldwiaV9JG2hSX9HIT3d7xDM5Y=
Content-Type: multipart/alternative; boundary="_000_GVXPR07MB9678259E45FDB02947AF9C40891BAGVXPR07MB9678eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: GVXPR07MB9678.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 05399e35-0005-40f2-643a-08ddff0bb410
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2025 03:53:08.6973 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 5LX8FAjvkFUiK8V9amgABhdE8v669gTdglG4xmswyv/shd/jSOsGfXw43X4J/ZvL/K9goFK/Moq9v9poxDG7IwrrCuexFu7ou1siqYD2lm8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR07MB11008
Message-ID-Hash: PXA3QZAKQ6ML6OYNYCIVB446QZRNWIX2
X-Message-ID-Hash: PXA3QZAKQ6ML6OYNYCIVB446QZRNWIX2
X-MailFrom: john.mattsson@ericsson.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-jose.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "jose@ietf.org" <jose@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [jose] Re: Add AES-OCB mode?
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/ackOCuiRBmtAdViXqrH0LA-qBh0>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Owner: <mailto:jose-owner@ietf.org>
List-Post: <mailto:jose@ietf.org>
List-Subscribe: <mailto:jose-join@ietf.org>
List-Unsubscribe: <mailto:jose-leave@ietf.org>
Hi Phillip, For robustness I would wait for NIST accordions. https://csrc.nist.gov/pubs/sp/800/197/a/iprd RFC 7253 already have very good text on the nonce reuse properties: It is crucial that, as one encrypts, one does not repeat a nonce. The inadvertent reuse of the same nonce by two invocations of the OCB encryption operation, with the same key, but with distinct plaintext values, undermines the confidentiality of the plaintexts protected in those two invocations and undermines all of the authenticity and integrity protection provided by that key. For this reason, OCB should only be used whenever nonce uniqueness can be provided with certainty. Start with reading RFC 7253 and decide if you want to proceed. Unclear how you wanted to do the registrations. The JSON Web Signature and Encryption Algorithms is Specification Required. > A128OCB, A192OCB, and A256OCB I don’t think I have ever seen anyone use AES-192, and can we just call it them AES-128-OCB and AES-256-OCB. A person from NIST recently asked me why I used so weird terminology, and I had to explain its JOSE’s fault :) Cheers, John From: Neil Madden <neil.e.madden@runbox.eu> Date: Sunday, 28 September 2025 at 21:58 To: Phillip Hallam-Baker <phill@hallambaker.com> Cc: jose@ietf.org <jose@ietf.org> Subject: [jose] Re: Add AES-OCB mode? On 28 Sep 2025, at 20:33, Phillip Hallam-Baker <phill@hallambaker.com> wrote: When I first read Rogaway's comments, he described it as tolerating nonce reuse, he doesn't any more. It isn't the direct rake stomp you get from GCM nonce reuse but maybe not good enough to justify a shift at this stage. He does bring up the issue of being maximally “resilient” to nonce-reuse in the SIV paper. But as he points out there as well, there is a massive performance penalty. Perhaps the way to go is simply breaking up large streams into chunks and GCM-SIV encrypting each chunk. This is essentially what Rogaway’s STREAM does - split the message into chunks (letting the app choose what a natural chunk boundary is), then you partition the nonce so that there is a per-message unique part and then a chunk counter and a single “last chunk” bit. These prevent chunk reordering and truncation attacks. https://eprint.iacr.org/2015/189.pdf However, obviously this reduces the effective size of the nonce, so you’d combine it with some nonce-extension scheme using a KDF, as you say. See https://developers.google.com/tink/encrypt-large-files-or-data-streams for one implementation that does exactly this, and this is also what Age does. — Neil Now for some reason I have never quite understood, folk seem to be very keen on reusing symmetric keys when I think you might as well make the problem maximally hard by doing a KDF to generate a new key as well as an IV each time. Yes, there was a time when the overhead of key setup mattered but that is a long time ago and I don't think any of the apparatus we use today would really benefit much. On Sun, Sep 28, 2025 at 2:53 PM Neil Madden <neil.e.madden@runbox.eu<mailto:neil.e.madden@runbox.eu>> wrote: On 28 Sep 2025, at 19:07, Phillip Hallam-Baker <phill@hallambaker.com<mailto:phill@hallambaker.com>> wrote: I am busy writing the drafts for proposing the JSContact exchange scheme to this group. One of the concerns that comes up is that AES-GCM remains a technique that turns a nice robust block cipher into a stream cipher and that makes it rather fragile when considering all the possible ways the botched and the bungles could mis-implement things. I’m not sure OCB is significantly better in this regard. Yes, I know formal methods are all the rage, been there, done that, might even collect the bit of paper with the ribbon some day. The problem with formal methods is that they only reveal the security of the system you analyze and only with respect to the concerns your tools are able to address. And the problem I have as a protocol designer is that you can end up with a scheme that is formally verifiable but brittle in operation. Case in point here being VENONA which led to the execution of the Rosenbergs despite one time pads being a provably perfect cipher. GCM-SIV is one possible option but it requires two pass processing which is OK for encrypting IP packets but severely limits application of the result. The DARE Envelope construct I am using as a basis was originally designed to support exchange of encrypted ZIP-like archives containing TBs of files. Single pass processing really is a must. You should really be using something like Rogaway’s STREAM to encrypt large files, regardless of underlying mode. And in that case the drawbacks of SIV are lessened. (But personally I’d choose something based on the original SIV, as AES-GCM-SIV has various drawbacks). See my earlier draft (which fell between the IETF cracks when the JOSE WG was disbanded): https://datatracker.ietf.org/doc/html/draft-madden-jose-siv-mode-02 AES-OCB is much better, it is robust even with IV reuse No it is not - as per https://web.cs.ucdavis.edu/~rogaway/ocb/ocb-faq.htm#nonce “ What happens if you repeat the nonce? You’re going to mess up authenticity for all future messages, and you’re going to mess up privacy for the messages that use the repeated nonce. So don’t do this. It is the user’s obligation to ensure that nonces don’t repeat within a session. In settings where this is infeasible, OCB should not be used.” That is the same as GCM. and we would likely have used it in place of GCM if there hadn't been three sets of conflicting patent claims. I know one version has issues but the scheme described in RFC7253 is generally believed to be sound. Phil Rogaway invented much of the apparatus used for formal analysis of symmetric algorithms. What I propose is adding A128OCB, A192OCB, and A256OCB to the registry of algorithms following the same approach as AES-GCM. They are just a drop in replacement. I’m not against adding OCB, but IMO it provides little practical benefit over GCM, especially for the typical use-cases of JOSE. I think one of the AEGIS variants is more interesting - https://www.ietf.org/archive/id/draft-irtf-cfrg-aegis-aead-17.html Best, — Neil
- [jose] Add AES-OCB mode? Phillip Hallam-Baker
- [jose] Re: Add AES-OCB mode? Neil Madden
- [jose] Re: Add AES-OCB mode? Phillip Hallam-Baker
- [jose] Re: Add AES-OCB mode? Neil Madden
- [jose] Re: Add AES-OCB mode? John Mattsson
- [jose] Re: Add AES-OCB mode? Phillip Hallam-Baker
- [jose] Re: Add AES-OCB mode? John Mattsson
- [jose] Re: Add AES-OCB mode? Phillip Hallam-Baker
- [jose] Re: Add AES-OCB mode? Phillip Hallam-Baker
- [jose] Re: Add AES-OCB mode? Richard Barnes