Re: [jose] RFC 8037 "alg" quirkiness

Anders Rundgren <anders.rundgren.net@gmail.com> Sun, 20 September 2020 08:51 UTC

Return-Path: <anders.rundgren.net@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 3E2413A118C for <jose@ietfa.amsl.com>; Sun, 20 Sep 2020 01:51:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, 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 fT4GRaEA44xs for <jose@ietfa.amsl.com>; Sun, 20 Sep 2020 01:51:55 -0700 (PDT)
Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 C19D93A0940 for <jose@ietf.org>; Sun, 20 Sep 2020 01:51:54 -0700 (PDT)
Received: by mail-wr1-x434.google.com with SMTP id w5so9670794wrp.8 for <jose@ietf.org>; Sun, 20 Sep 2020 01:51:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=8RRSi1zB2zM0wWHLSXud556ft70XeV0gZ1E8XML1eqk=; b=R+thv4k6h1kRUEbdpVpQ9/cbMnr6q/suJ7XI1knqrLumXyFALdRXR2w12XsH4fhC2X TJ6joWL6WczZ7tAj2+UEioZ9GYCjjjcD582EdiehB9OEFXoscIDB6DBRqwvluM8JpRLN wBG57uBUOCjZAXGbuyiZPEwvu+wBqxLcdEpmUA3epnWcwl6q8k5RnAfgYzSdruKgFPKC cwL4Gag5IetT01OWkr/PLS0ZJpnrVN9AcE3TonNcTMhagIHWJ1xwoFf/DAnoNGRhQVqp F0bjni6snAEeRZ9PKOS5PcXOOSCWjDq1ERPsCU1/KinILb6/SYqTS4MnGGjEW6eoTdDd vT0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8RRSi1zB2zM0wWHLSXud556ft70XeV0gZ1E8XML1eqk=; b=Vv+zZoQrY+U9aws6HYB28/nX0hOI0jcCWXx5LOeREUbL8KP0RWUGxneIvjYQL1UvGm cUZAOO01+/JrYqdVKjl+XumIRVnQK6J7SGv5jxmCJ+c49SSwefNoaHTrfw4ow1N4GBrg bZ1ywse9khclvqmMxWnGdVGSe1sIum7AKIvflN2w2a5aSCxxaHJVrzVxeFYzKlBvJKfy c32me9gCBwuUeQcZPBTb+MCbTGI0Q+0A1QbSAlswMbZy1AZ4nvcGZe3vS5t3KehU/LVQ B+xzK1VSlCWNRcjok+ho/xbxGW84HxrBUQaph0Xu4z2qQ5X63iFrG6NwyoRTxOA902N8 ixJw==
X-Gm-Message-State: AOAM532RZDbdDUVymoZVtLCdx29tZaUAX3RxNplCAQN6OMCSW04KDARd qpQzSEW5neEHgeRCKcNeNicVq8ySy9/pvg==
X-Google-Smtp-Source: ABdhPJzNlMa6y0m8cMutT2LbxTCkO4M+oGDrVY1LLiIiQD3slE8tWCdB+OtIdno+pnINqvwHwl//AA==
X-Received: by 2002:a5d:574a:: with SMTP id q10mr24198098wrw.127.1600591912588; Sun, 20 Sep 2020 01:51:52 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id k8sm14640674wma.16.2020.09.20.01.51.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Sep 2020 01:51:51 -0700 (PDT)
To: Jim Schaad <ietf@augustcellars.com>, jose@ietf.org
References: <1a84f81d-c7bd-9961-9f5c-e6c358fc1095@gmail.com> <039901d68ed6$2ed27ba0$8c7772e0$@augustcellars.com> <83d038c3-f475-6d17-0d57-946a6ce889c5@gmail.com> <03b701d68f1c$b4266640$1c7332c0$@augustcellars.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <d9e5dea3-5440-6343-8913-f8fb498f2f7d@gmail.com>
Date: Sun, 20 Sep 2020 10:51:49 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <03b701d68f1c$b4266640$1c7332c0$@augustcellars.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/kZRoAAxzj0E2pNGE3xOYkSYdyTk>
Subject: Re: [jose] RFC 8037 "alg" quirkiness
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.29
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: Sun, 20 Sep 2020 08:51:56 -0000

On 2020-09-20 09:07, Jim Schaad wrote:
<snip>
> 
> FWIW, here is how the quirk manifests itself in my JOSE library:
> 
> 
>       JSONObjectWriter setSignatureAlgorithm(JSONObjectWriter joseObject,
>                                              SignatureAlgorithms signatureAlgorithm) {
>           return joseObject.setString("alg",
>                                       signatureAlgorithm.isOkp() ?
>                "EdDSA" : signatureAlgorithm.getAlgorithmId());
>       }
> 
> [JLS] This draft will soon render this code incorrect.  https://datatracker.ietf.org/doc/draft-ietf-lwig-curve-representations/

Sure, note though that the draft (in contrast to RFC 8037), defines key-specific "alg" parameters.

Anders