Re: [jose] [COSE] Fwd: New Version Notification for draft-reddy-cose-jose-pqc-kem-00.txt

tirumal reddy <kondtir@gmail.com> Wed, 06 March 2024 13:43 UTC

Return-Path: <kondtir@gmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 57A70C14F5F4; Wed, 6 Mar 2024 05:43:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham 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 qza1-O4-SHil; Wed, 6 Mar 2024 05:43:36 -0800 (PST)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 74EFEC14F5F1; Wed, 6 Mar 2024 05:43:36 -0800 (PST)
Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5668db0720fso1650290a12.0; Wed, 06 Mar 2024 05:43:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709732614; x=1710337414; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TvQZfOHRLBJtrtyJFf1U+f5XR12CqixPXcA9xNwGcAc=; b=D5AQz1SMW3wkZhhYUEybsIjIPts4UrN8ROeP4+tVpJWpJG/eGTVT1cHcfz9KiV2wNZ 0RR6LqaLanOGd1b2FlMdssw/t5QUVY89FBdwc0UghArJ9+bSNX5co5qy1FC5aa+ntCwd V9FDZRIGvA3oi2FB8a2v7d5YOUGyNaHD1s5t9NwcAijmVZ/B2xf/z602/RD40JUcGZAT 0MSgVmAQQJtsDZFr1YAI9904TACP5aWjEjVdCnewORJlMkjXYFtoYDcV2uTXjADYUu2q p8NcGbEF/AfSG/VR5bNzJUqx+ZiuG9tU/5av1ffhSxt2OmITlmjuHJ0bRw8XR1yIfg3q 5AtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709732614; x=1710337414; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TvQZfOHRLBJtrtyJFf1U+f5XR12CqixPXcA9xNwGcAc=; b=AieUUbXdpctnMpdE4Ky+vGeP/qsacObSO2ebvlIDL9ZWl7nilBEWx5CxRyvcMIgOuS nC/+tpu58xZ060UTinDfO9YGjHNLSzb9QB0lAEif5sHq1krijVLUfip8U9nMoz3Z8B28 ynxFliHO9+eQ1OCh8RYnt8nP2nLBQ8uZDKIXyabjLIHpBEXS/uvFcIGz4Y8Wq2M9TcfL 1R2EHxlLmiVY6ia8x0ldTzd8ELq/fSLibMuXpwYppi4Ovt90rN8HITrpywNPvq0F75Gt 9QIddCCHHZqBttrTW/PcyeByrLOnEpeTrFCXL9fa2NbXLJGI5n/p8bqL/7ORbvlkRPXW noGQ==
X-Forwarded-Encrypted: i=1; AJvYcCX9Z69zfR520XjiI19NvRQBJfHrRCqBGE9W2pDXBu7bbL3WPWEVUTU3QnmBMykh/iqgDJnHRouNqcmwnVxe
X-Gm-Message-State: AOJu0Yyj07cDhCTe1qpRB94pSVN/7lo699WLowKg/WZQOBsoLrVEXHX/ cHFm0ji2t/a6+53zMaxxsbWfO4sgCIxeEconu7t8D9yMbDhMLa3D6koprfWHJ/uDXP/W+TxHOo1 FcNmZx6VEHr8UjVWPCOODCFTerlXXrYjiTW8=
X-Google-Smtp-Source: AGHT+IG03uYfGvcQXT7bo946fUSSIgv+jFEd7g4Du0eleLMcAfxk5DLlVcYFJJnIZDX1MXG9KKv5/WtmiHik1A24s98=
X-Received: by 2002:a50:d6c7:0:b0:567:db8c:4fe9 with SMTP id l7-20020a50d6c7000000b00567db8c4fe9mr1848101edj.0.1709732613592; Wed, 06 Mar 2024 05:43:33 -0800 (PST)
MIME-Version: 1.0
References: <170944215832.65165.15558599263256086018@ietfa.amsl.com> <CAFpG3gdGiw2wap8C1H+AOWvEn1ewSjmtBmghKKAvNBmXnDmoYg@mail.gmail.com> <Zec4yMywy_v5bnUj@LK-Perkele-VII2.locald> <CAFpG3gfJDgO-yuk9B1-zic4ajAfO0w9aTwyUi72TdX8qC5xzoA@mail.gmail.com> <ZegyxtVIjQhZhYWi@LK-Perkele-VII2.locald>
In-Reply-To: <ZegyxtVIjQhZhYWi@LK-Perkele-VII2.locald>
From: tirumal reddy <kondtir@gmail.com>
Date: Wed, 06 Mar 2024 19:12:56 +0530
Message-ID: <CAFpG3gfjmCcmuHgvYcnFM8cODFTyo32muErFhVZMPBiikEEJhg@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: cose@ietf.org, jose@ietf.org
Content-Type: multipart/alternative; boundary="0000000000001821a00612fe2535"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/m-bLAYJTwj-HJ0RoLe44FGVhDPI>
Subject: Re: [jose] [COSE] Fwd: New Version Notification for draft-reddy-cose-jose-pqc-kem-00.txt
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Mar 2024 13:43:40 -0000

On Wed, 6 Mar 2024 at 14:39, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:

> On Wed, Mar 06, 2024 at 01:11:26PM +0530, tirumal reddy wrote:
> > Hi Illari,
> >
> > On Tue, 5 Mar 2024 at 20:53, Ilari Liusvaara <ilariliusvaara@welho.com>
> > wrote:
> >
> > > The way KEMs operate is extremely similar to how ECDH-ES works. So the
> > > way to add KEMs is to copy ECDH-ES (fully specified if needed) and make
> > > small modifications required for it to work.
> > >
> >
> > I think you are proposing the following changes:
> >
> > 1) Direct key Agreement: The alg parameter will carry the full specified
> PQ
> > KEM with KDF and AEAD (e.g., PQ-MLKEM768-SHA3-384-AES256). No need to
> > define "PQ-Direct" in this mode.
>
> Direct Key Agreement does not use AEAD for anything. If using a KEM, it
> just combines KEM and KDF (the existing ECDH-ES implcitly uses SHA-256).
>
> Moreover, there is no need for PQ, and usually with SHA-3, one uses
> SHAKE256 instead of >256-bit SHA-3. There is only ever going to be one
> variant, so might as well leave that out from the name.
>

SHA-3 is internally used by ML-KEM but I don't see any problem using
SHAKE256 with the three parameter sets of ML-KEM.


>
> So something like "MLKEM768". "enc" parameter will retain its meaning
> specified in JWE.
>
> The way it works will be extremely close to how ECDH-ES works.
>

Got it, but it will allow any AES key size to be used with any parameter
set of ML-KEM.


>
>
> > 2) Key Agreement with Key Wrapping: alg parameter will carry the full
> > specified PQ KEM with KDF and AEAD key wrap (e.g.,
> > PQ-MLKEM768-SHA3-384-AES256KW). The "enc" parameter will be used as usual
> > to carry AEAD to encrypt the content.
>
> Again, per above plus some conventions, it would be "MLKEM768+A256KW".
>
> And the way it works is extremely close to ECDH-ES+A256KW.
>

Yes, works for me (except for the above concern).


>
>
> > > The two main modifications compared to ECDH-ES are:
> > >
> > > 1) The shared secret is generated by encapsulation/decapsulation
> instead
> > >    of ECDH operation.
> > > 2) New header parameter for KEM ciphertext, as it is octet string and
> > >    not a key.
> > >
> >
> > Yes, it is possible to introduce a new header parameter to carry the
> > KEM ciphertext.
>
> In COSE, one can reuse the -4 from COSE-HPKE draft as it has all the
> correct properties. However, JOSE needs a new parameter.
>

-4 is used to carry an encapsulated key, which is a serialized ephemeral
key of the sender. What is the need to overload this parameter to carry an
encapsulated key in HPKE and ciphertext in PQ KEM ?

-Tiru


>
>
> -Ilari
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>