[COSE] "P-256K" in draft-ietf-cose-webauthn-algorithms

Filip Skokan <panva.ip@gmail.com> Wed, 27 March 2019 13:16 UTC

Return-Path: <panva.ip@gmail.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3E6FD1202BE for <cose@ietfa.amsl.com>; Wed, 27 Mar 2019 06:16:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LmMUIbfNXTos for <cose@ietfa.amsl.com>; Wed, 27 Mar 2019 06:16:48 -0700 (PDT)
Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3846F120285 for <cose@ietf.org>; Wed, 27 Mar 2019 06:16:48 -0700 (PDT)
Received: by mail-wm1-x330.google.com with SMTP id o25so16085731wmf.5 for <cose@ietf.org>; Wed, 27 Mar 2019 06:16:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=z5PXZBdHGY0bJUS37Fu723RhovPGxQzJw/0ViXQGq9o=; b=RBBhV1qsEphlduaTFpvo+ffkGOKrNaCAuqYh63kDydNWxdyYDcUJuNXEC5bjOYAEnO fETva6Gg23QJ+4fO2CGy7zwXQsBVNo0oVxOcgfP/WZEWJ0YJVDNIycDfzz2nEuhc8iFv 2hm0o23kdQJto8q6V+JXQJU3J0a8C2pcAGMFlOZO1LYYBl134wYxAWb+3LvxgCVzbpu1 0k0YZ9pQHWMdjO0R+QpbRPiUISeLWOFf/HHF38pIR+v3wKi8WkBbzoVHDhsS2jy8S79S V0FAH9pwVVRBGH2VVQ5wNpQ7xh3KmBUFiB8tUis39cCgUbdAygRn6+nl8uccWyUzQvju swqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=z5PXZBdHGY0bJUS37Fu723RhovPGxQzJw/0ViXQGq9o=; b=lGtw5gc2KTQRdW3kFF+SqdWOdnYOWHUDEL3UGJxMCcg9Vn6IT4B3qdhfs8XQz8eJ0z gULQW1Pww+rk+oXyQsCHSGiyAPyRU36/IcOwI5r/ud+Em0u/xyQu4+t1wpQ5PSAx/jmm vyme+F8UkV9UMrWzq3Qvw+jaVq6LlWIw2Js6MJj4mx71TXSLifuz4I8Y+yFCoJpL6BIJ Fwqbd1SacoJYZCt4P2HvygdnWinNuZWRhWPepJPVECTHVy66ySWDCPFqTYR8yvZwNYV4 BWiks9c2SFaKWv8Dm2+5mrNHE88gbzrpRwhwAEQhsnOcSYM8ooaR+Jmyy89/rt7ylyeC E5CQ==
X-Gm-Message-State: APjAAAV/8tm8oWFvKa4PG5t0Bc4J9PmNnJwR2RKHPp/mhfBLCVWZne7q QJXieJHwJQtNnM8ueoI3UN1gvp8=
X-Google-Smtp-Source: APXvYqzpZYziIwicvMw1G1agV2mxhz8lWFjRRPneskI6FpkgkaYS2YoLYVR1oZJDTv9D5XxGynPvng==
X-Received: by 2002:a1c:f014:: with SMTP id a20mr18008817wmb.122.1553692606464; Wed, 27 Mar 2019 06:16:46 -0700 (PDT)
Received: from [100.96.117.46] (ip-37-188-133-129.eurotel.cz. [37.188.133.129]) by smtp.gmail.com with ESMTPSA id a9sm23045775wmb.30.2019.03.27.06.16.45 for <cose@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 06:16:45 -0700 (PDT)
From: Filip Skokan <panva.ip@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-9D57B497-B15D-499E-B91C-209804258CDA"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Message-Id: <64A280DE-04BF-4443-8ED5-EFF25E38E4C2@gmail.com>
Date: Wed, 27 Mar 2019 14:16:44 +0100
To: cose@ietf.org
X-Mailer: iPhone Mail (16D57)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/MoQIUODarSRIbQaaMGPxgidK2Zo>
Subject: [COSE] "P-256K" in draft-ietf-cose-webauthn-algorithms
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Mar 2019 13:16:51 -0000

Hello,

Once more to the correct mailing list...

this draft has caught my attention since it touches JOSE as well, specifically it proposes registration for the uses of secp256k1 "bitcoin" curve. I learned from Mike Jones that there's a discussion around naming the key's curve and the JWA algorithm.
 
> - "P-256K"
> Do we really need a new name for secp256k1? I would suggest not. Most of the document talks about secp256k1 anyway. Giving secp256k1 the alias P-256K gives the impression that it is a curve standardized by NIST, which it is not. Mike> Others have also suggested simply using the name "secp256k1". I'm fine with that.

I'd like to advocate for sticking with the proposed (in current draft) "P-256K" for EC key's crv, and "ES256K" for the JWA alg. These values are already quite common in existing implementations, quite a few hits for this.

[1] https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.keyvault.eckey.p256k?view=azure-dotnet
[2] https://connect2id.com/products/nimbus-jose-jwt/examples/jwt-with-es256k-signature
[3] https://static.javadoc.io/com.nimbusds/nimbus-jose-jwt/5.10/com/nimbusds/jose/jwk/ECKey.html
[4] https://github.com/panva/jose/blob/master/lib/jwk/key/ec.js#L22-L23
[5] https://github.com/relocately/ec-key

As mentioned in the IETF 104 meeting on Tuesday the other encountered naming of this is "K-256" but there's considerably less hits searching for implementations using that one.

I understand the COSE group does not (probably) have existing implementations of secp256k1 and that's why the notion of just naming it secp256k1 resonates, but maybe consider only doing so for COSE. JOSE could use less fragmentation amongst its implementations and therefore sticking to the most common naming already in the wild would be welcome.

The same applies to the presented question about Compressed vs. Non-compressed Points for secp256k1, i'd advocate that at least for JOSE the used points remain in-line with what's already used in with the existing keys and algorithms.

Best,
Filip Skokan