Re: [jose] [COSE] COSE and JOSE Keys for Kyber
Orie Steele <orie@transmute.industries> Tue, 15 November 2022 13:15 UTC
Return-Path: <orie@transmute.industries>
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 A1751C14CEED for <jose@ietfa.amsl.com>; Tue, 15 Nov 2022 05:15:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.085
X-Spam-Level:
X-Spam-Status: No, score=-2.085 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=transmute.industries
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 MbVhy8N7mmOb for <jose@ietfa.amsl.com>; Tue, 15 Nov 2022 05:15:14 -0800 (PST)
Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 E8015C14CE23 for <jose@ietf.org>; Tue, 15 Nov 2022 05:15:14 -0800 (PST)
Received: by mail-ed1-x535.google.com with SMTP id a5so21767343edb.11 for <jose@ietf.org>; Tue, 15 Nov 2022 05:15:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transmute.industries; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1EshIiK4eZ0hWNavL7hKgt9k2qIbk5aiXET+p0xz3Ik=; b=WEEqqRAvW6XL/HGIExgRSxjKSd7IxPdNHrIf7JAS2Z4of8ktIuhdnE+y2NO01wSsV6 HcaeAxkhm4b9vkTAsF2upLp1YXMesi5HNLx0FrGldj15PP0Lqs+Qx4Zhkmu/HpD2Tszd jhHfnLsv5hNld82uml2LBDYyOIlRvrD8wnBa/AjYxuLIbp+g4a0akqUSjatjkavkvchY g4D68LLMyb8uhQOn96Fq8FbisdsUQypQisF7zDWRgFXy5acUkPRbBFQzrutw/3mcKfxE 6t5RhFHxWnupi/UE6Bw+Ak8wM2QSItdalaTw8d2irafkZyqxTCBC+1a41mqlpdE2InZB 5Tpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=1EshIiK4eZ0hWNavL7hKgt9k2qIbk5aiXET+p0xz3Ik=; b=7oQP74XKotsrD7u5QA+HgcYrTBFhhHmDWcYCP8o8qXpFUz+kHyawGgmnY3gyX+/ymw VrGY82bCq274/+X3UgJF86p4kTV2I9rEjHgX8TXXCLPfdVq69jZLyzlVVJgD+Q9MfNJj 5BxBqmtJeLSYPfIZub6JVokgTS+ruXS0uJ1wQ6px4xXnZ6Y+PAX1toRvv4S93Vrh6h/y wbRoVorZ0x+amTZIho4NWfWeJ2K9nc+kzGySizqp50ZOaH29Py1bdPW+hT8rXsVRotA3 NUXn1Q8rt6BR8JlkgxwbfU51+TzKfL8f1514Xg6RKt61OK+wSADQZtx8nzWCPDyM89zm vd3Q==
X-Gm-Message-State: ANoB5pmKM/ht9WwYrsPxtXDT5QF2L4yKA/BicZE7zZeh4PRBVSxeW4Ns VnWHtZCnFWUPN/z3zohIFIAnXB3FNXVKhmhHpSeuwQ==
X-Google-Smtp-Source: AA0mqf7db3qU8QPiia1y121SWaKSXVjy88XF1Vmhvpy2fuvz8gXpWPgstwqmuLQOaZP8vuiwWpbqze8M51/hRO28d98=
X-Received: by 2002:aa7:d4d3:0:b0:45f:b80f:1fe8 with SMTP id t19-20020aa7d4d3000000b0045fb80f1fe8mr14381584edr.118.1668518112601; Tue, 15 Nov 2022 05:15:12 -0800 (PST)
MIME-Version: 1.0
References: <CAN8C-_LVgq0j5YtFrrO-fWNNXvGSWohQ0874DV5qgfYT4FXT0Q@mail.gmail.com> <Y3IquzJcwMXpwqF0@LK-Perkele-VII2.locald> <CAN8C-_JdGMVMTt16DpDXCqMbmVmqSRAMaHb57X2j092=PAn1Jg@mail.gmail.com> <Y3Kihz762QRilElF@LK-Perkele-VII2.locald> <CAN8C-_LHXt=vS09NDnjBnd5FYqNC0G7cXRCF8-+qQNUq=uFOsA@mail.gmail.com> <Y3NqdFD5lER4GibN@LK-Perkele-VII2.locald>
In-Reply-To: <Y3NqdFD5lER4GibN@LK-Perkele-VII2.locald>
From: Orie Steele <orie@transmute.industries>
Date: Tue, 15 Nov 2022 07:15:01 -0600
Message-ID: <CAN8C-_KmpmYpfDouHyb6_jZjMxNhm5qwaD6zfdTPj==bS30-qQ@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: cose <cose@ietf.org>, JOSE WG <jose@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006769a905ed822525"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/GtnUJnmBikF5YH33OtnRevLwY0g>
Subject: Re: [jose] [COSE] COSE and JOSE Keys for Kyber
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: Tue, 15 Nov 2022 13:15:18 -0000
Thank you for this detailed response. Building on it, is this what you would expect for a Kyber JWK? { kty: OKP, crv: Kyber-1024, alg: KEM+SHA3KDF+A256KW, x, d } It seems we have a few high level options to consider: 1. Ilari's proposal to use OKP and `crv` to represent lattice and hash based public key cryptosystems 2. The new kty proposal for LWE, NTRU and HASH 3. Adding a new registry for Lattices and Hashes and adding a new `crv` like property for representing their subtypes. Is there another high level approach we should document for consideration? Regards, OS On Tue, Nov 15, 2022 at 4:31 AM Ilari Liusvaara <ilariliusvaara@welho.com> wrote: > On Mon, Nov 14, 2022 at 04:07:48PM -0600, Orie Steele wrote: > > Thanks again! Responses inline: > > Responding to broad points: > > > OKP always requires crv. Which is just horribly named: OKP MAY be used > for lattices, in which case not only is crv used, but the lattice goes > to the "COSE Elliptic Curves" registry, despite not being anything to do > with elliptic curves. > > And then, the BLS curve, while being elliptic curve, is not the kind of > elliptic curve as understood by COSE/JOSE (otherwise it would be EC2/EC > like the usual elliptic curves). > > > Actually, the problem with fixing alg for JWE keys is not between single > and multiple recipients, but between compact and JSON serialization of > JWE. And similar issue already exists for ECDH-ES: > > If key has alg=ECDH-ES, it can be used with compact serialization, but > not JSON serialization, limiting it to a single recipient. > > Conversely if key has alg=ECDH-ES+A*KW, it can be used with JSON > serialization (generic or flattened), but not compact serialization. > > In COSE, the constraints are a bit different: ECDH-ES+HKDF* can be > used with multiple recipients, at cost of extra space. And using > ECDH-ES+A*KW costs space if there is only one recipient. > > And similarly for ECDH-ES* -> KEM+SHA3KDF* > > > There is no way to limit COSE encryption keys to HKDF-SHA256, since > the only possible scopes of restriction are encryption (which is too > loose) and algorithm (which is too strict). > > > The combinatorial explosion would occur between KEMs, KDFs and KWs. > Adding just the three kyber variants would give at least 6 alg's, > with more appearing if there are additional KEMs. Obviously, using > generic KEM in alg avoids it. E.g., the proposed four alg's: > > - KEM+SHA3KDF (probably just shorten to "KEM") > - KEM+SHA3KDF+A128KW (probably shorten to "KEM+A128KW") > - KEM+SHA3KDF+A192KW (probably shorten to "KEM+A192KW") > - KEM+SHA3KDF+A256KW (probably shorten to "KEM+A256KW") > > (The reason for using SHA-3 for KDF is that whatever the KEM is, > it most probably internally involves either SHA-3 or SHAKE). > > > > > -Ilari > > _______________________________________________ > COSE mailing list > COSE@ietf.org > https://www.ietf.org/mailman/listinfo/cose > -- *ORIE STEELE* Chief Technical Officer www.transmute.industries <https://www.transmute.industries>
- [jose] COSE and JOSE Keys for Kyber Orie Steele
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Ilari Liusvaara
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Orie Steele
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Ilari Liusvaara
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Orie Steele
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Ilari Liusvaara
- Re: [jose] [EXTERNAL] COSE and JOSE Keys for Kyber Mike Ounsworth
- Re: [jose] [COSE] COSE and JOSE Keys for Kyber Orie Steele
- Re: [jose] [EXTERNAL] COSE and JOSE Keys for Kyber Orie Steele
- Re: [jose] [EXTERNAL] COSE and JOSE Keys for Kyber Mike Ounsworth