[COSE] Strip signatures from COSE_Sign structures?

"Kampanakis, Panos" <kpanos@amazon.com> Fri, 20 December 2024 19:35 UTC

Return-Path: <prvs=0775f2578=kpanos@amazon.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 E9E0BC14F704 for <cose@ietfa.amsl.com>; Fri, 20 Dec 2024 11:35:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.246
X-Spam-Level:
X-Spam-Status: No, score=-2.246 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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, 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 (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 B07aSe9LBrle for <cose@ietfa.amsl.com>; Fri, 20 Dec 2024 11:35:16 -0800 (PST)
Received: from smtp-fw-9106.amazon.com (smtp-fw-9106.amazon.com [207.171.188.206]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 150A0C17C8A5 for <cose@ietf.org>; Fri, 20 Dec 2024 11:35:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1734723318; x=1766259318; h=from:to:subject:date:message-id:mime-version; bh=4skJL/fxAi2rVWjjgY8cf64bfYYC8ndhpva3lcwwp74=; b=P/GhelXanlDtixetMOBKyE3KKvCdm60PTc2JDo1LNujBg0sgjEqE7Ll6 tFjMy/JY4OMNp/KUmKjN7DYdVbgAFlerjdyAdx42EnA0z2AF1d6r72od2 9G3FGjgEiB/R/4pslxPehfpveUzI0YxAyvoXrtkzveUduN+q8jguRVjQ2 U=;
X-IronPort-AV: E=Sophos;i="6.12,251,1728950400"; d="scan'208,217";a="784987513"
Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-9106.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2024 19:35:12 +0000
Received: from EX19MTAUWA002.ant.amazon.com [10.0.7.35:42115] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.39.3:2525] with esmtp (Farcaster) id af034f19-9bb7-4084-8735-ad2688a7c763; Fri, 20 Dec 2024 19:35:10 +0000 (UTC)
X-Farcaster-Flow-ID: af034f19-9bb7-4084-8735-ad2688a7c763
Received: from EX19D002AND004.ant.amazon.com (10.37.240.230) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.39; Fri, 20 Dec 2024 19:35:02 +0000
Received: from EX19D002AND002.ant.amazon.com (10.37.240.241) by EX19D002AND004.ant.amazon.com (10.37.240.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.39; Fri, 20 Dec 2024 19:35:02 +0000
Received: from EX19D002AND002.ant.amazon.com ([fe80::b4ce:3b74:ef43:1a1c]) by EX19D002AND002.ant.amazon.com ([fe80::b4ce:3b74:ef43:1a1c%8]) with mapi id 15.02.1258.039; Fri, 20 Dec 2024 19:35:02 +0000
From: "Kampanakis, Panos" <kpanos@amazon.com>
To: "cose@ietf.org" <cose@ietf.org>
Thread-Topic: Strip signatures from COSE_Sign structures?
Thread-Index: AdtTFXii/JXjWM39Q5aJk/RPFYktqA==
Date: Fri, 20 Dec 2024 19:35:02 +0000
Message-ID: <bf839ee5060243a79f908ce2db299c25@amazon.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.37.240.172]
Content-Type: multipart/alternative; boundary="_000_bf839ee5060243a79f908ce2db299c25amazoncom_"
MIME-Version: 1.0
Message-ID-Hash: LM4PHL6JPYYVSWDIMENNTBYZAJG2UA3Y
X-Message-ID-Hash: LM4PHL6JPYYVSWDIMENNTBYZAJG2UA3Y
X-MailFrom: prvs=0775f2578=kpanos@amazon.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cose.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [COSE] Strip signatures from COSE_Sign structures?
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/_-2mdGQC5BlJoeJRWKeNr29JPPw>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Owner: <mailto:cose-owner@ietf.org>
List-Post: <mailto:cose@ietf.org>
List-Subscribe: <mailto:cose-join@ietf.org>
List-Unsubscribe: <mailto:cose-leave@ietf.org>

Hi COSE WG,

Pardon my COSE illiteracy, but I could not find the answer.

COSE can carry multiple signatures of the content which are validated independently. But could I take COSE legitimate content signed with SigAlgo1 and SigAlgo2, and remove the Algo2 signature structure, so that the verifier will only validate with Algo1?

CMS prevents this by a new MultipleSignatures signed attribute defined in https://www.rfc-editor.org/rfc/rfc5752 which signifies that there are more signatures for the content and thus the other signatures cannot be stripped.

I could not find if such functionality is available in COSE.

Thank you,
Panos