Re: [CFRG] new draft modifying HPKE

John Mattsson <john.mattsson@ericsson.com> Thu, 04 November 2021 17:53 UTC

Return-Path: <john.mattsson@ericsson.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 823453A11B6 for <cfrg@ietfa.amsl.com>; Thu, 4 Nov 2021 10:53:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 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, 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=ericsson.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 OlVgPWcoJquo for <cfrg@ietfa.amsl.com>; Thu, 4 Nov 2021 10:53:03 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70082.outbound.protection.outlook.com [40.107.7.82]) (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 F28683A11B2 for <cfrg@irtf.org>; Thu, 4 Nov 2021 10:53:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=leDRSM8MdWpSV1QatShccZG8Ums+sgORGpnfsorhgU41W5rOCyFcqYOUAB7SEK3giwSt7A9zgiiYMTCHKVl/cRiJsDBGPupXi+OYtyqhoN8jr4V9DV3ZIkiUlKhokHHVRYbQyDPCs5NE5S7cYkaFu9VZEfiRNzhthQuPtVauub0ieR8PscHE0l4Y5i/5rDOOZicCX5qjHg24SJeFXihFrQM3k0bN61YTiaweK7lohsUq/qxXnwCjjNRy1yNyrSh6Z0nK0WdsteB/ZPLdxPjkVAnvui1gcd+jne5Zw0LDzg64Ww36RJnVYF6q/tmDjP7nkZpw3OeGKDZgyd2Pi22H6Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=/ZHN+lxJiKMdJQ9Q+bjyqGcnuKxHmVDGQ6iHccu7QKs=; b=Irf7DJ2Io5zm/Z9Nj/b2bR98IZkeA7qhX8DOi/BMpic776LsbLzbwqLpL/id5pI/o0qYCuyRHFXyZm/IkVMZqsS9DvJBxlg3bbHOOXWszscf/hX/SniknQCRdx6JlYjN6/Isz7h6xBjAS5JGgFcEinkkcSeYNnb6EF4MfI8P0npM13FatTCegFEvU23XHZPbHIh1AWBq0UraPLmwLouHEGSMkUqAmJHqw4FO1xIzXseNRRArKGxngbc1yBOT/1+OWXUzgviLuI8kBKDh2tKhQ9G9PWAw9TBhHsIzPARsOYcmvcfxg/AsVyw/YcnyLh8ugXfaDUYhNl4MeLn6183+LA==
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=/ZHN+lxJiKMdJQ9Q+bjyqGcnuKxHmVDGQ6iHccu7QKs=; b=Uo8tX3JSsTJY53vstDXJALzh7tQDc/a6Gwl4/fftwV3PbBpe7xyzc3DA8OqsrWO6+ZC5TX0bf5z6F9hYJhebyi+R4EvCbeKl7I5hPK4CXRSnWpTv6SJtMGH40bcdtoud+2gXthjeuMFVEnDcBi/8QtiBqnvsJLwT6JkWXh/yXEY=
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com (2603:10a6:3:4b::8) by HE1PR07MB3211.eurprd07.prod.outlook.com (2603:10a6:7:2f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.8; Thu, 4 Nov 2021 17:52:55 +0000
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::acd7:51e8:bdfe:c133]) by HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::acd7:51e8:bdfe:c133%7]) with mapi id 15.20.4690.006; Thu, 4 Nov 2021 17:52:55 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: Dan Harkins <dharkins@lounge.org>, "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: [CFRG] new draft modifying HPKE
Thread-Index: AQHXYUhPbmv1I8iJpEC8QhxFvdp+HKv0hmSX
Date: Thu, 04 Nov 2021 17:52:55 +0000
Message-ID: <HE1PR0701MB30505993C71E71009BBF3F66898D9@HE1PR0701MB3050.eurprd07.prod.outlook.com>
References: <ac30b613-d9db-7d43-4e11-f82a880a41e0@lounge.org>
In-Reply-To: <ac30b613-d9db-7d43-4e11-f82a880a41e0@lounge.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: dfabdef2-de40-49d8-604a-08d99fbbee83
x-ms-traffictypediagnostic: HE1PR07MB3211:
x-microsoft-antispam-prvs: <HE1PR07MB32115B87533E3A92EF783D0A898D9@HE1PR07MB3211.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: kF5o9/FLjWaDIMkeP5gTfwS5RITFwyiT9pM00kCFRdFb3Z2NLr+QPvQAGuJF0McFix2kr7J0jT9rrab5WPzR94Av3G7umlk5avq3J+MG6NqG8hLlD/NKkml7sNSfDSKzGu26W7uNbslcj44r2HYb8whvz17OmXD1i3lf4xcOrL6LVehAWoW51106hnaCbDAPr/j9ngZiC+p90whKEZiSoHZ6zjbtfvNdlCllzPMUPhtVjNT9/MFgLYRQJCx+QvxL81gUByQckc/uUgaj8sv7Lujv7VXzII20nogP5KOc9g/rQDVheI9uac0vR2DD+ejpuTPGK0hZFuzENaB0i0PPMl/xctfyp5TX26Z7O9yFH+WduGdNg/VM9lDPKgt0bMlS1qsNBeBHfN4AI6uFCyPmdVIzQm4k9e959xaPG1bqHCOFtxBQtB+RCPzh2C1jnWrFzfNcEj5F+CkIB8cSBlPTjI4UawD/S7GrgamRmUMI34I/fheIa/LY5ClEMReFCRm+fSrBRv7YolEoOF2Jza8At1oxPMtaBCCiyP6/K40YkUnYB/rXDvNDAAw1eZDX15EFbxnjVOLhweCbvlW7DEiDI1AoBZcNt55AF0VDPN3mu6ESKFFcMVK3upeBY/wU5Z881fZL4edvdvcGv77gAQ1/b7POJqAOhfTLOGYeMOvF7wnogWUU5tGLvv5IWSTJxFxwEKT/NHhHa7kWzFEZZKE7ozj2bskvyzRVNqMpD+6Kz21+v9B/3g+StnOOR2VALuhoQSzzC7GCWjE1H3+xPq0XT3gedOUKbTb1x51CmTMGihWSqphAP0RTW5+7Q7GomHyYl0KfVo94AsXI6awwXLcPmw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0701MB3050.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(166002)(26005)(52536014)(5660300002)(33656002)(38070700005)(83380400001)(53546011)(6506007)(7696005)(44832011)(186003)(82960400001)(66476007)(110136005)(66556008)(64756008)(66446008)(38100700002)(966005)(122000001)(71200400001)(508600001)(91956017)(76116006)(66946007)(8936002)(316002)(9686003)(8676002)(2906002)(55016002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: d2nCSyZrIs6kMGEaFanaF6op/scjIUkbHsCr6h8VearkkSrFJ0R1MVPhb4JpK1IUQGaiPEbLuI5kvBGTbfcAajEQtdj+AwuBwCfxDhWwf2GS3VUr7dECMvcqw1rxFyHLR/F2GPyQm+sES72owu/KSKgqDACJlDmurzHjJBFDGOyVQ4zRYGpJ3NoJ2joOLyLL4CPeIfOyNPIVsh/Tj8SlvY8x/K2VXjsq8WlfNRMGwqrFOQjJytgsZfIQWI3/F779oNvBf9qP95PVFq+TtS38JY88y34ehFCEeoM4VQ74UoXOn5h4GwreDxqv/aarumDyahSVCvDi/Gi3NYRLfIgtgtlcpPEc17jje0jNvPqP8L+Qmw9dRxriZK2pjHJmLH8VQ4ssAwxKpSvxkayzfekAaCXVGNlldpYmkkWrhiTy73k5nFH8U+JRKpg3lrrW+HQ3I9jo0iJ7gKaStYKIoqmun0fwQTBi+uQI3F/XEY2T6yrPLFwUhnyjpOveyfbvs/+u8KFe9JXzNa/okuadqBppjqm+7++cFygnthiFOsT3eVbYjTlJIDA5K9hNqc29b4jeJ9j+410VHdyd4M770dJWdAeCufRcOCSEiQYZ99dJAgI8iL7Co6FaSgrV8QkbihijnZAOraC1ejk3vdizsYlvU6d1EYTebmwERl4hCWA+A39pXc9+EiHDiL1A6OqP5IFQuJgVsbiLgrM2pZY9ttmszYPc2+WzDZa+DCPDTL1wSLTI2OPwZ4rIldvHjAJLDDROTtOn5Mj6BmePAtGNwGqSxbEL6wrzNq+HujcXaLvhgzkIJNc8Jj1oqGlxpUKh3DBJ+zlkdrQ22yl5IgRKEBl3RyNRUKRmtXE/GrvgIrpaWKtcC9rLgEaM74ZQxy3jHE91bEmdBK+4z1akJekiaadO++WApHD5bLb1aSU7hD0SkA7tg0SSbUlVfhbl7Mgq5savDN29JrOq1QErFLQp5NQlnzSKHqH65FrlFpkTyPRaSbK7gueKM+Cdha/SZ+itorv/IctPeyTsGCE6FC19NCC8em3xRSA5vQBD6M62vwoKuRtvMkpG5mYRJ8U75iAAPwkBhxWJR4KdZGth1mMjBEXi34AV//tKReEqG95G6ZHZeKSd24Uv8V1sWj4MJHuSNF74r3bh7TrBItG4ikAvcetjac8sXvn1QbM5lNr05HanxN+DdZh8xBWw2oAA9DAjfnIL/N7AcAToF5eOjo2pb8+6jZ5M1/bhnYlGx9lCTSQAUeZlmYTOb3rPOrQAzn7jewGmf+40oTe+/j5prTFKN7vj3YDPTguWrfYqoW4NtiJ2/7FtwtmAgTj6gxalLv4EX+bbfXd59R48kKC3yU9ojNKg6DnhtdJ+4O2oxytAEDZJJ9bAI1eGpSM+9K5J9yv6V0Pmteidp91PsUtrueytOMAjPx36tbbL0FQYIGwjasnJ0PIWtdaN8vPPLgiarXbJe1ljYA+s9MmPY0rtWuoS9trhOcYWtTuudOkQ54cj2q4syncM8KjAdSyv1qjt1kOQEZvNMWfX0j5ELbDjZtTOXC+tcdMe8XfSaJjbobRAO/6kdjOv3L4HmJl5i1pN/d5Ah/9jU2KKJoiA3QziXxefIT/ZGZvj6AGytce3+OTPyGGwwuzx97999mQgkY1u5JCfHegQ35YcT/7rD3d+F7QKrBGyLOE8T+4sL+cSAr3nMW+Vn5g=
Content-Type: multipart/alternative; boundary="_000_HE1PR0701MB30505993C71E71009BBF3F66898D9HE1PR0701MB3050_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0701MB3050.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: dfabdef2-de40-49d8-604a-08d99fbbee83
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2021 17:52:55.7154 (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: D4TWR50GiJtrkiU4TO10BA0gcaGFSSB03eNcN05wDR9cCvWNrFOvDZa39na0Se7sGOvmsoez+yQd37ZRmmikw2VwcHbjl74TEMlwCrwQqMA=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3211
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/Mr8fe3C5idnbFnfi01bdve4sF0o>
Subject: Re: [CFRG] new draft modifying HPKE
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Nov 2021 17:53:09 -0000

Hi Dan,

New KEMs with Compact Representation
------------------------------------

Thanks for spending time of this! I think this is great work. I don't have any comments on this part of your draft, it seems very well written. Some related stuff:

- After the HPKE discussions on compact representations there was a suggestion from Karthik that the LAKE WG could specify a compact representation format that could be usable by other protocols. This was done in an appendix of the EDHOC draft. I don't know if there is any need for alignment with your draft.
https://datatracker.ietf.org/doc/html/draft-ietf-lake-edhoc-12#appendix-B

- There is an ongoing discussion in the TLS WG regarding compact representation:
https://mailarchive.ietf.org/arch/browse/tls/?gbt=1&index=9f5CCCAksexcvJ5JuPsBOcvigpw

- There is a new draft in COSE suggesting using HPKE in COSE., which is aimed at constrained IoT.
https://datatracker.ietf.org/doc/draft-tschofenig-cose-hpke/
https://mailarchive.ietf.org/arch/msg/cose/KbuVtBk5vcxrTOzi2TWTUZiikmk/

Deterministic AEADs
------------------------------------

Having read the draft quickly once, I don't realize immediately when the use of nonces would be a big problem, but I am sure you will explain when you present this to CFRG.

"in the case proposed here, the nonce is not used"

I see nonce-resistant modes as an extra security measure that helps when nonce reuse happens for some reason. Not using a nonce by default leads as you say to "concealment of whether or not a given plaintext was encrypted twice". I don't think that is a good security level, unless you are sure than your plaintexts will be different. I think “no nonce” should only be recommended for applications where it is known that the plaintexts will be different.

Cheers,
John

From: CFRG <cfrg-bounces@irtf.org> on behalf of Dan Harkins <dharkins@lounge.org>
Date: Monday, 14 June 2021 at 20:08
To: cfrg@irtf.org <cfrg@irtf.org>
Subject: [CFRG] new draft modifying HPKE

   Hello,

   I know the cement on HPKE isn't quite dry yet but I wanted to get
something ready
for when it is. As I've discussed on this list before I want to add 2
things to HPKE:

   - compact output of the NIST curves
   - deterministic authenticated encryption

There's a new draft in the repository proposing just that:

     https://datatracker.ietf.org/doc/draft-harkins-cfrg-dnhpke/

Please take a look. Comments are welcome.

   Also, I implemented this in my HPKE code:
https://protect2.fireeye.com/v1/url?k=75e2b750-2a798e50-75e2f7cb-86fc6812c361-5e7ecf43d4ad5e61&q=1&e=abe1414d-b2b6-46d7-a3e2-201e6cb4b21f&u=https%3A%2F%2Fgithub.com%2Fdanharkins%2Fhpke-wrap.
The test vectors there are basically copied from the standard ones but I
replaced
the KEM with the new KEM, compacted serialization, and encrypted with
AES-SIV. I'd
welcome any attempts at interoperation.

   regards,

   Dan.

--
"The object of life is not to be on the side of the majority, but to
escape finding oneself in the ranks of the insane." -- Marcus Aurelius

_______________________________________________
CFRG mailing list
CFRG@irtf.org
https://protect2.fireeye.com/v1/url?k=fa797d66-a5e24466-fa793dfd-86fc6812c361-1938fbf5cdc3e03c&q=1&e=abe1414d-b2b6-46d7-a3e2-201e6cb4b21f&u=https%3A%2F%2Fwww.irtf.org%2Fmailman%2Flistinfo%2Fcfrg