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

Neil Madden <neil.e.madden@gmail.com> Thu, 24 November 2022 18:40 UTC

Return-Path: <neil.e.madden@gmail.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 CA5E0C14CE4A for <cfrg@ietfa.amsl.com>; Thu, 24 Nov 2022 10:40:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.096
X-Spam-Level:
X-Spam-Status: No, score=-7.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 5iSGRppGfoyG for <cfrg@ietfa.amsl.com>; Thu, 24 Nov 2022 10:40:17 -0800 (PST)
Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EEE03C14CE4C for <cfrg@irtf.org>; Thu, 24 Nov 2022 10:40:16 -0800 (PST)
Received: by mail-wr1-x434.google.com with SMTP id z4so3629715wrr.3 for <cfrg@irtf.org>; Thu, 24 Nov 2022 10:40:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=w7AXuNFIQgxHIkSWT6Z86mR/ndiXFN+8LheGYFU+ee8=; b=pxt8c6L+R9inmN0H47u7vqMCCb8erooItWeEbPPUF8uTkuBxPHstZcyi7PmPs9FGW9 MTB4nJmbe5IyFuct3Yji0Pw+V5nFAzBedsOlp5vxIXcdM+Ka/XYEnpfEZ1EIJCw/YBwS s+/8yS3t1NZ8Lko0DekMUQgWixdFxpCFfGsmLNYPYPzFFbqtciL2l9Jge9jyByeFRwDn 4wQiNR0VfG67F+DHRistv2cfmkteDqeK7TMJYo7VBARKROLXbFIMY75CSrWO0oKZKOST GJEiNU7dz0JNJEe5YT5rSw1Nvdl02lFSgcZbMuakpKBdr9DkrQswdeA4dYoJw8yykGYx zTVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w7AXuNFIQgxHIkSWT6Z86mR/ndiXFN+8LheGYFU+ee8=; b=oOe+GVHlGGk1tMIjLgWt6BplGoqeUPczQZkXxNr4pEBrvIXkrRDAuOBM1k6IGCjKvT pDah+8P2XnErPdF2Ap85sF1ze6pFHbkOhmdB5hZco8DOMtvUh9htyWdqlWDlFlLuZowF Qwe90Dj0kXrrA9M5hNHUkCf5e4XBHTjE4n/1aIOpGCKG/3wKOuebANF8juBWoHluTRc7 nVZ8yE/i12amgGyZ0+dlv0/BX3imyI7d8ZpZ49laE8witSuNguLu3/rxImp5SK4dk3Ox He49210YskCMVwDkHMsGVdW1uvBIg9Ms3e6jHgyyTrsxgtiIIRZrtoW3PTmO5uAALgAc HYgA==
X-Gm-Message-State: ANoB5plmRuozBG2OL5K/TbYN69aUouq5Ul2C+1ZYZk5P8gBXRzZtF5aR DJGhm2XGLdw93wTp9nUKeNw=
X-Google-Smtp-Source: AA0mqf5xYNGHNu3GRgwryE9w1ThaHUYCxZTvQGMniaD4Lbn/GMFvDBD/ODbSRHV6p9J99qz/hoLleg==
X-Received: by 2002:a05:6000:18f:b0:241:a046:91ff with SMTP id p15-20020a056000018f00b00241a04691ffmr20762561wrx.23.1669315215150; Thu, 24 Nov 2022 10:40:15 -0800 (PST)
Received: from smtpclient.apple (233.213.93.209.dyn.plus.net. [209.93.213.233]) by smtp.gmail.com with ESMTPSA id w5-20020adfde85000000b00241cbb7f15csm1922371wrl.106.2022.11.24.10.40.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Nov 2022 10:40:14 -0800 (PST)
From: Neil Madden <neil.e.madden@gmail.com>
X-Google-Original-From: Neil Madden <Neil.E.Madden@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-E35278DD-845B-4470-A1C4-6863D4E2DF2E"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Thu, 24 Nov 2022 18:40:12 +0000
Message-Id: <DFD28D47-6007-4536-9DF8-61CAE03E0BE9@gmail.com>
References: <CH0PR11MB57397983E338A31423A792499F0F9@CH0PR11MB5739.namprd11.prod.outlook.com>
Cc: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>, Ilari Liusvaara <ilariliusvaara@welho.com>, cfrg@irtf.org
In-Reply-To: <CH0PR11MB57397983E338A31423A792499F0F9@CH0PR11MB5739.namprd11.prod.outlook.com>
To: Mike Ounsworth <Mike.Ounsworth@entrust.com>
X-Mailer: iPhone Mail (19G82)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/hAQz8qA_bgxVPHLu_PbMW7cei30>
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: Thu, 24 Nov 2022 18:40:18 -0000

Right. As others have said, if all you have is a Kyber certificate then you are stuck doing interactive authentication (as far as we know). If you care about non-interactive authentication then getting into a situation where all you have is an non-auth KEM certificate would be a bad idea.

(If you were going to do what I suggested then the public keys for the KEM and signature scheme should be combined and thus you’d have a single cert for the combined algorithm rather than separate certs). 

— Neil

> On 24 Nov 2022, at 18:31, Mike Ounsworth <Mike.Ounsworth@entrust.com> wrote:
> 
> 
> John Mattsson said:
>  
> > I think that is a good idea. But I think the construction should probably be:
>  
> Add the recipient identity to the message.
> Sign the message with Dilithium
> Encrypt [recipient ID, message, signature] with HPKE-Kyber
>  
> > That is probably a good solution for CMPv3
>  
> I disagree.
>  
> Take for example a Kyber certificate trying to authorize/authenticate a request to the CA for its own revocation, key update, or cert renewal. All you have is a KEM certificate; where do you get a Dilithium key from?
> Of course you could create an ephemeral Dilithium key, but a signature from an ephemeral key is fairly useless.
>  
> Some PKIs will always issue pairs of KEM / Signature certificates, but you don’t get to assume this in general when designing the certificate management protocol  – this will be especially true if TLS AuthKEM takes off and demand for KEM authentication certificates skyrockets. Plus, if you’re using CertA to authorize management operations for CertB, then you have to strongly establish co-ownership of the two certs, which may be possible in some PKIs (for example if the CA has a consistent DN structure that strongly identifies both certs as belonging to the same entity / device / hardware key storage container, whatever the PKI administrator has deemed to be the definition of “co-ownership” for that environment), but requiring PKIs to be able to determine co-ownership of certificates would be a departure from current requirements of the CMP protocol where mechanisms exist for all cert types to self-administer.
>  
> ---
> Mike Ounsworth
>  
> From: CFRG <cfrg-bounces@irtf.org> On Behalf Of John Mattsson
> Sent: November 24, 2022 12:01 PM
> To: Neil Madden <neil.e.madden@gmail.com>; Ilari Liusvaara <ilariliusvaara@welho.com>
> Cc: 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.
> Nail wrote:
> >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?
>  
> I think that is a good idea. But I think the construction should probably be:
>  
> Add the recipient identity to the message.
> Sign the message with Dilithium
> Encrypt [recipient ID, message, signature] with HPKE-Kyber
>  
> That is probably a good solution for CMPv3
>  
> Cheers,
> John
>  
> From: CFRG <cfrg-bounces@irtf.org> on behalf of Neil Madden <neil.e.madden@gmail.com>
> Date: Thursday, 24 November 2022 at 17:00
> To: Ilari Liusvaara <ilariliusvaara@welho.com>
> Cc: cfrg@irtf.org <cfrg@irtf.org>
> Subject: Re: [CFRG] How will Kyber be added to HPKE (9180)?
> 
>  
> On 24 Nov 2022, at 15:36, Ilari Liusvaara <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.