Re: [CFRG] How will Kyber be added to HPKE (9180)?

"Kampanakis, Panos" <kpanos@amazon.com> Fri, 25 November 2022 17:09 UTC

Return-Path: <prvs=3211d9d13=kpanos@amazon.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 347D8C1522C1 for <cfrg@ietfa.amsl.com>; Fri, 25 Nov 2022 09:09:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.495
X-Spam-Level:
X-Spam-Status: No, score=-14.495 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, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazon.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pgNfGf9ba4oy for <cfrg@ietfa.amsl.com>; Fri, 25 Nov 2022 09:09:26 -0800 (PST)
Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) (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 B82EDC1522BF for <cfrg@irtf.org>; Fri, 25 Nov 2022 09:09:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1669396166; x=1700932166; h=from:to:cc:date:message-id:references:in-reply-to: mime-version:subject; bh=WDIQ2hWjKeQeNf+E1fLPNdp5IoVQcjgqlir1a0LpyEo=; b=QVzi8Nf/tng8oJWdWWBnNIgVIhHrwYEi9S9YFYaajPz1juAi2ud6/FOG yMSt3xa1vBs7IfgPWpWPQ0aZdmlubSfy/azE4wwjAGaW8Y66JxC/HXXhg fOzQpGz8XYDYk8i22GnS2AWcm72eN9zB+oqFQxs6HrR6Z92rs9g9dZrrN k=;
X-IronPort-AV: E=Sophos;i="5.96,194,1665446400"; d="scan'208,217";a="267120894"
Thread-Topic: [CFRG] Re: How will Kyber be added to HPKE (9180)?
Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-m6i4x-b538c141.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 17:09:22 +0000
Received: from EX13MTAUWC001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1e-m6i4x-b538c141.us-east-1.amazon.com (Postfix) with ESMTPS id 6C7CDA109D; Fri, 25 Nov 2022 17:09:21 +0000 (UTC)
Received: from EX19D001ANA003.ant.amazon.com (10.37.240.188) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 25 Nov 2022 17:09:20 +0000
Received: from EX19D001ANA001.ant.amazon.com (10.37.240.156) by EX19D001ANA003.ant.amazon.com (10.37.240.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.20; Fri, 25 Nov 2022 17:09:19 +0000
Received: from EX19D001ANA001.ant.amazon.com ([fe80::4f78:75cd:3117:8055]) by EX19D001ANA001.ant.amazon.com ([fe80::4f78:75cd:3117:8055%5]) with mapi id 15.02.1118.020; Fri, 25 Nov 2022 17:09:19 +0000
From: "Kampanakis, Panos" <kpanos@amazon.com>
To: Mike Ounsworth <Mike.Ounsworth=40entrust.com@dmarc.ietf.org>
CC: "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Index: AQHZAB5+TmQsEuJCGUKbVkKEOy5Hk65OQCkAgAAYVgCAAYZroA==
Date: Fri, 25 Nov 2022 17:09:19 +0000
Message-ID: <0a5ff423dc904171bcfdfc8423edf3ee@amazon.com>
References: <CH0PR11MB57392DCA742E5F9D3D30EF6F9F0F9@CH0PR11MB5739.namprd11.prod.outlook.com> <Y3+PkLzkHFFFG0Hi@LK-Perkele-VII2.locald> <A8593A5F-3345-42FC-A34A-0DBC3DC873F1@gmail.com> <CH0PR11MB5739444E17F33F29F6CB71689F0F9@CH0PR11MB5739.namprd11.prod.outlook.com> <CA+_8ft5SxUjEMuWXACd_yF6H5DUwBYFA=VeGXeOzSFhdNw_NvQ@mail.gmail.com> <CH0PR11MB57396EC3AC2E028CC187E44A9F0F9@CH0PR11MB5739.namprd11.prod.outlook.com>
In-Reply-To: <CH0PR11MB57396EC3AC2E028CC187E44A9F0F9@CH0PR11MB5739.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.106.179.30]
Content-Type: multipart/alternative; boundary="_000_0a5ff423dc904171bcfdfc8423edf3eeamazoncom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/PgMQ2jSqjgRHioRXW53Yp6mn19M>
Subject: Re: [CFRG] How will Kyber be added to HPKE (9180)?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
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: Fri, 25 Nov 2022 17:09:30 -0000

Do you need an AKEM for CMPv3 Mike?
I think CMP was using implicit POP by encrypting (no auth involved) the returned cert to the recipients public key. HPKE could provide that in its base mode (only encryption) using ECDH, Kyber or ECDH+Kyber KEMs.
Do you want to auth the issuing CA or do you want to use HPKE in another context for CMPv3?


From: CFRG <cfrg-bounces@irtf.org> On Behalf Of Mike Ounsworth
Sent: Thursday, November 24, 2022 12:44 PM
To: Karthik Bhargavan <karthik.bhargavan@gmail.com>
Cc: cfrg@irtf.org
Subject: RE: [EXTERNAL][CFRG] [EXTERNAL] Re: How will Kyber be added to HPKE (9180)?


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.


Thanks Karthik, John, Neil, and Ilari,

CMP is its own crypto protocol, independent from TLS, IKEv2, QUIC, etc. It does have an over-HTTPS mode (RFC 6712), but that does not replace the need for CMP messages to be internally authenticated. We are not looking to re-design CMP, but simply to add Kyber-based message protection modes to the list of already supported modes.

I think I have learned from this thread that we are indeed looking for (or at least can tolerate) an “interactive Kyber Authenticated Key Exchange (AKE)”, and that HPKE will not provide it.

Thank you all for your input!

---
Mike Ounsworth

From: Karthik Bhargavan <karthik.bhargavan@gmail.com<mailto:karthik.bhargavan@gmail.com>>
Sent: November 24, 2022 10:17 AM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com<mailto:Mike.Ounsworth@entrust.com>>
Cc: Neil Madden <neil.e.madden@gmail.com<mailto:neil.e.madden@gmail.com>>; Ilari Liusvaara <ilariliusvaara@welho.com<mailto:ilariliusvaara@welho.com>>; cfrg@irtf.org<mailto:cfrg@irtf.org>
Subject: Re: [CFRG] [EXTERNAL] Re: How will Kyber be added to HPKE (9180)?

HPKE is designed as a one-shot construction, whereas Figure 3 of the Kyber [2018] paper is an interactive two message key-exchange protocol.
So HPKE will not fit your needs if this two-message protocol is what you require.
KEM-TLS using Kyber may be closer to what you need, if it gets standardized (https://kemtls.org/<https://urldefense.com/v3/__https:/kemtls.org/__;!!FJ-Y8qCqXTj2!bzzcSdG0DZcFc0dGnZeAgTOqtMbLRkqcjO4ydB60wCy_RqPexOM2K6s0H0bwVneCICLD6wwoo5oUoPhmBdTCAlSU6MuzIIk$>)

-Karthik



On Thu, Nov 24, 2022 at 5:04 PM Mike Ounsworth <Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:40entrust.com@dmarc.ietf.org>> wrote:
Thanks Neil.

But wouldn’t that require the client to have a long-term signature key? That is not our case; we need to derive MAC keys in cases where both client and server have Kyber certificates.

The general question of “how” is out-of-scope here; I’m just trying to ask if this is possible with RFC9180 + some future extension to support Kyber.

---
Mike Ounsworth

From: CFRG <cfrg-bounces@irtf.org<mailto:cfrg-bounces@irtf.org>> On Behalf Of Neil Madden
Sent: November 24, 2022 10:01 AM
To: Ilari Liusvaara <ilariliusvaara@welho.com<mailto:ilariliusvaara@welho.com>>
Cc: cfrg@irtf.org<mailto:cfrg@irtf.org>
Subject: [EXTERNAL] Re: [CFRG] How will Kyber be added to HPKE (9180)?

WARNING: This email originated outside of Entrust.
DO NOT CLICK links or attachments unless you trust the sender and know the content is safe.
________________________________

On 24 Nov 2022, at 15:36, Ilari Liusvaara <ilariliusvaara@welho.com<mailto:ilariliusvaara@welho.com>> wrote:

On Thu, Nov 24, 2022 at 02:49:33PM +0000, Mike Ounsworth wrote:
Hi CFRG!

Background: we are working to add KEM support to Certificate
Management Protocol v3 (CMPv3) (draft-ietf-lamps-cmp-updates, which
will eventually be 4210bis). We are planning to accomplish this by
supporting HPKE (RFC 9180) as a new message protection mechanism in
CMPv3 and hoping that we can inherit Kyber more-or-less for free once
HPKE supports it.

Question "how": How will Kyber be added to HPKE? I assume there will
be an equivalent to section 4.1 that defines KyberKEM with its own
Encap(pkR), Decap(enc, skR), AuthEncap(pkR, skS), and
AuthDecap(enc, skR, pkS) - ie the same interfaces as for DHKEM (4.1),
but making use of Kyber internally? The Kyber2018 paper [1] figure 3
defines an authenticated Kyber exchange that looks like it should
easily fit into the existing HPKE APIs. In other words, will
supporting 9180 now with abstractions around those 4 functions allow
for easy drop-in of Kyber later?

Kyber does not support AuthEncap/AuthDecap. The whole reason why Auth*
interfaces is optional is to allow for KEMs that do not allow non-
interactive authentication, like the post-quantum ones.

In fact, the only possibly-PQC algorithm to support AuthEncap/AuthDecap
is CSIDH (not to be confused with totally broken SIDH/SIKE), and
security of that in both classical and quantum settings is subject to
debate.

Isn't there a straightforward generic construction of an AKEM from a normal KEM plus a (PQ) signature scheme that could be used here? i.e., run the KEM and then sign the encapsulated key? Obviously this would produce quite large encapsulations, and a "key-pair" for such an AKEM would then be two key-pairs encoded into one (with a covering self-signature to prevent tampering). In principle this seems doable?

-- Neil
Any email and files/attachments transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If this message has been sent to you in error, you must not copy, distribute or disclose of the information it contains. Please notify Entrust immediately and delete the message from your system.
_______________________________________________
CFRG mailing list
CFRG@irtf.org<mailto:CFRG@irtf.org>
https://www.irtf.org/mailman/listinfo/cfrg<https://urldefense.com/v3/__https:/www.irtf.org/mailman/listinfo/cfrg__;!!FJ-Y8qCqXTj2!bzzcSdG0DZcFc0dGnZeAgTOqtMbLRkqcjO4ydB60wCy_RqPexOM2K6s0H0bwVneCICLD6wwoo5oUoPhmBdTCAlSUPDNXP10$>