[Wimse] Re: Runtime costs of multiple signatures?

"McAdams, Darin" <darinm@amazon.com> Fri, 26 July 2024 00:49 UTC

Return-Path: <prvs=930a70731=darinm@amazon.com>
X-Original-To: wimse@ietfa.amsl.com
Delivered-To: wimse@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2ABB0C1D5319 for <wimse@ietfa.amsl.com>; Thu, 25 Jul 2024 17:49:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.552
X-Spam-Level:
X-Spam-Status: No, score=-4.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.148, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazon.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 lhGQhfr0J5Hn for <wimse@ietfa.amsl.com>; Thu, 25 Jul 2024 17:49:47 -0700 (PDT)
Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AEBB2C1D5309 for <wimse@ietf.org>; Thu, 25 Jul 2024 17:49:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1721954987; x=1753490987; h=from:to:cc:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=0i9WMloYgEYM3eWeh0/0+w03d8Ig2lvXRH9HEf+DSuI=; b=vILf9QTXBjNtOhhUbwsDjHx1Xhjpbo7PoVfOB5qWTW0qeIm8ctN51SBv 18AFjGGx3Vakvu88vf/XmXkR5HJzmASi2lIAl9jJ+Ysax7qAcllktRuX+ eWY63JlsZ7ZSW9cAkIZQ1yTCGYM12uBImdmQU7lXUYAB/Awc3sHt4nIon Y=;
X-IronPort-AV: E=Sophos;i="6.09,237,1716249600"; d="scan'208";a="438513684"
Thread-Topic: [Wimse] Re: Runtime costs of multiple signatures?
Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2024 00:49:46 +0000
Received: from EX19MTAUWC001.ant.amazon.com [10.0.38.20:16765] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.8.210:2525] with esmtp (Farcaster) id cbcec48c-2892-4106-be39-aa097bf4ad95; Fri, 26 Jul 2024 00:49:46 +0000 (UTC)
X-Farcaster-Flow-ID: cbcec48c-2892-4106-be39-aa097bf4ad95
Received: from EX19D008UWA003.ant.amazon.com (10.13.138.241) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Fri, 26 Jul 2024 00:49:45 +0000
Received: from EX19D008UWA004.ant.amazon.com (10.13.138.220) by EX19D008UWA003.ant.amazon.com (10.13.138.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Fri, 26 Jul 2024 00:49:44 +0000
Received: from EX19D008UWA004.ant.amazon.com ([fe80::d946:a53:e254:7768]) by EX19D008UWA004.ant.amazon.com ([fe80::d946:a53:e254:7768%5]) with mapi id 15.02.1258.034; Fri, 26 Jul 2024 00:49:44 +0000
From: "McAdams, Darin" <darinm@amazon.com>
To: Watson Ladd <watsonbladd@gmail.com>
Thread-Index: AQHa3hdHgMiL2EWpt0igUJsrnUPPHLIILzuE
Date: Fri, 26 Jul 2024 00:49:44 +0000
Message-ID: <89478A9C-609B-4A7B-B310-382B9F3565D4@amazon.com>
References: <9EFDE84B-77A9-4CB8-8E10-96D6305FD42A@amazon.com>,<CACsn0cnNQZFV3xefxCOGXKVhD6LNjSovap-39=r-jd7-r1VG-A@mail.gmail.com>
In-Reply-To: <CACsn0cnNQZFV3xefxCOGXKVhD6LNjSovap-39=r-jd7-r1VG-A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Message-ID-Hash: LXVAW5RGDI2TIZUT7Y7D52NARGQULCOR
X-Message-ID-Hash: LXVAW5RGDI2TIZUT7Y7D52NARGQULCOR
X-MailFrom: prvs=930a70731=darinm@amazon.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "wimse@ietf.org" <wimse@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Wimse] Re: Runtime costs of multiple signatures?
List-Id: WIMSE Workload Identity in Multi-Service Environment <wimse.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/wimse/Q3e0KBWn-TBLiWgWlZvIvhFrDGE>
List-Archive: <https://mailarchive.ietf.org/arch/browse/wimse>
List-Help: <mailto:wimse-request@ietf.org?subject=help>
List-Owner: <mailto:wimse-owner@ietf.org>
List-Post: <mailto:wimse@ietf.org>
List-Subscribe: <mailto:wimse-join@ietf.org>
List-Unsubscribe: <mailto:wimse-leave@ietf.org>

ECDSA 256 verification is a part of it. There’s also multiple invocations of a JSON parser to get at contents of the JWTs, and other overhead.

> On Jul 24, 2024, at 3:17 PM, Watson Ladd <watsonbladd@gmail.com> wrote:
> 
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
> 
> 
> 
>> On Wed, Jul 24, 2024 at 2:35 PM McAdams, Darin
>> <darinm=40amazon.com@dmarc.ietf.org> wrote:
>> 
>> I ran the numbers and we’re on the edge of what (I think) is acceptable, and on a slippery slope.
>> 
>> Here’s the stats. Consider 4 tokens that could become common in workloads: (1) access_token, (2) WIT token, (3) WPT Token, (4) Txn-Token. Based on the examples in the specs, we’re in the ballpark of ~2K bytes (25% of typical 8K header space), and approaching a millisecond in processing time for all the hashing, signature verification, and JSON parsing. And, that’s the baseline. It would increase further with RAR, or adding richer context to a Txn-Token, and so on.
>> 
>> The reason I say it’s a slippery slope is because I’m observing a pattern where each WG solves it’s goals by adding 1-2 tokens to a request. Viewed independently, each decision is logical. Cumulatively, it leads to a tragedy of the commons in terms of consuming the shared, finite space in HTTP headers.
>> 
>> Workloads are especially sensitive to these details due to the scale at which they operate. As a result, I would raise the question whether the working group’s criteria for evaluating solutions should include some reasonable goals on cumulative token sizes and processing time. This may lead us to consider more compact representations of tokens, or perhaps mechanisms to bundle more information under fewer signatures.
> 
> ECDSA 256 is 53 microseconds to verify on my mac according to openssl
> speed. 4 of them is 212 microseconds. Where is the other 700
> microseconds coming from to get to a millisecond/can we fix this by
> using more compact formats?
> 
> Sincerely,
> Watson
> 
> 
> 
> --
> Astra mortemque praestare gradatim