[lamps] Re: [EXTERNAL] Implied vs. explicit signature digest in PKCS#7 and CMS
Mike Ounsworth <Mike.Ounsworth@entrust.com> Thu, 24 July 2025 11:39 UTC
Return-Path: <Mike.Ounsworth@entrust.com>
X-Original-To: spasm@mail2.ietf.org
Delivered-To: spasm@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id E031C4A39430 for <spasm@mail2.ietf.org>; Thu, 24 Jul 2025 04:39:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.794
X-Spam-Level:
X-Spam-Status: No, score=-2.794 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_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=entrust.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WPkSpXjjML65 for <spasm@mail2.ietf.org>; Thu, 24 Jul 2025 04:39:56 -0700 (PDT)
Received: from mx08-0015a003.pphosted.com (mx08-0015a003.pphosted.com [185.183.30.227]) by mail2.ietf.org (Postfix) with ESMTP id D04274A39420 for <spasm@ietf.org>; Thu, 24 Jul 2025 04:39:53 -0700 (PDT)
Received: from pps.filterd (m0242863.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56O6hSaK026780 for <spasm@ietf.org>; Thu, 24 Jul 2025 06:39:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=entrust.com; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=mail1; bh=eVcjRzFpsEEcD+JzGNR/z63WAfB0 7cVTFnoM0v8A2os=; b=QJIxG30caOc0WFxHt03QP4dJ0kGnGaNUfgPFfORM3Ieb tDJAb27GPdmYKzb2BGI86afZcFh8owUZho1YETUG52d4rv3SRdwFy4PeJcrmsUL8 LZ8sR/plkTpyA9x+Tgu0FCdDrSncoRsPHoka93v73PMAJeymUBtja/ezhqTwb8wK zoyqDl9Oj8aFeJu3rltHTHPXUsLl8uaWYfJ+7XA1/bYNBcKN/Kg+Yti6V5niiL6E 5zeoQYkzQ3265I45CyFZUhNvBisqhMEc7pyj5HqPqXUEhGD3f6kUXCkeRtyQx1Cg F0kohxehtmjMLc3z3eQkHcCwdd2d4m5AP6l9NyrRAA==
Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02on2105.outbound.protection.outlook.com [40.107.212.105]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 483ftgrnrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <spasm@ietf.org>; Thu, 24 Jul 2025 06:39:52 -0500 (CDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PDxE2+Y//yxYECkXn4w8nFDKY56RSYc4wA1Rm7ZBb1cMCyB5NBa4HrtVGAnWXqXvpOmHokCc9K2nqaoIURqMWoTHF2/EjrtjEmKRgpeWoNcE3HjZQDdk+80ttS0B03dAepQezCVCnJXBKqoBeImwNAGkZ+PT98KAw3aMCTQe21UqWrKA8qJJl9Q699y4C3cVjJgSy8FpcGCLPoYapYjbeNbC7ovEagBDuxezlYuBgiNgV8BiHxwSzmIsEdkCwe7o62TQ6DjyXk5dnkDySNnJAU0Jq82ynn2jdVgVRTE/XCfgP5LZDSwE5P3YzNi1iMxW5N+vzbn3oADds8bsvptYNw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eVXMRsfAzKz98hHphcONsc/xYUQPUiNhs4mouxAjQek=; b=lMioeOf6rXSkHtW0okESAQ19cdetojXcnAp/e5u6woxXdNqnaPKbrTJJIlJ5IHJqSf0EMF76smIQBaE+CUUjzkj/zjsXLLD2unajGX6QiJBYyaaS8AAMpHEyy7+oJ4PYO1bwe7dGFaK0aCpX6Ns1uR7gBHOPlK7zRb5u0pvoOq7zp/qrg8ffFaboSZTOM5U9CK15ZwbcDleNb2XypxnAFLzrh/Uwlo6BvVGsLwTok6rh5LSYV8VWRCpUG+XLTj7gIiHYI5AVQ5i4BUOqFBUQmVn93KHJjYLFBYaGJkUIS7Lr+zyCFzN0r4J+muur2dW4cPnevJv6HlrIlLnQLkncNg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=entrust.com; dmarc=pass action=none header.from=entrust.com; dkim=pass header.d=entrust.com; arc=none
Received: from CH0PR11MB5739.namprd11.prod.outlook.com (2603:10b6:610:100::20) by IA4PR11MB9129.namprd11.prod.outlook.com (2603:10b6:208:55e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8943.28; Thu, 24 Jul 2025 11:39:47 +0000
Received: from CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::b93d:b2d:3ad8:9702]) by CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::b93d:b2d:3ad8:9702%5]) with mapi id 15.20.8943.029; Thu, 24 Jul 2025 11:39:46 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: "spasm@ietf.org" <spasm@ietf.org>
Thread-Topic: [EXTERNAL] [lamps] Implied vs. explicit signature digest in PKCS#7 and CMS
Thread-Index: AQHb/HFTHz4JkMaFG0+8F29H4FUbxLRBI4Yw
Date: Thu, 24 Jul 2025 11:39:46 +0000
Message-ID: <CH0PR11MB57390AADD3F4F7A449F8ECD29F5EA@CH0PR11MB5739.namprd11.prod.outlook.com>
References: <aIHoZnzlauYM74_q@chardros.imrryr.org>
In-Reply-To: <aIHoZnzlauYM74_q@chardros.imrryr.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH0PR11MB5739:EE_|IA4PR11MB9129:EE_
x-ms-office365-filtering-correlation-id: e8cc53c0-d5b3-4f78-080d-08ddcaa6ca96
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|4022899009|376014|8096899003|38070700018|13003099007|7053199007;
x-microsoft-antispam-message-info: sIRodEpiQEo+Wl2MvGJJNEVR8PKnDCsOx3WFWIJmr07Y2Sjs2hInsjE35S0Q8G14UHsZ4503P8RuF+vaDWRZnJRnI88/YeasQmkD74cpAdo/x4INKtxtNjstT8Nk4HXdWeNrtl+XIYp3ZnO0H9BgOpPQvKBIPymkkONhfMqoU9pEqr86L8t6XdGLnT0sWBfok+lhUduLHrfDJNWAa3K1ZqaSCn3gfum8sTdrwElU5SXVZQVTZ4/lZ5oaFRPwFP7txzqhCtECvm1uEUFfwO57fHRS0jZcqD0PKoolIUr2YNzHsOm2RDN/V9ijMsBrQ9xlu5a1xpCFB/k39DPtx2sgIZ428AHYeqh+hDbZmMNIvag5HvjWutWetiGAgDq6NHQxcW8N+FsoHOGmdIb2k6Bi+TwTX94S49FhkGhE00SJixr1X7RpcYDeX7VpIXR07es2XdiTooo/4waKpCm532nt/zT1JztFZm3QIDD02a8h6efuDOYf8SAJz16AOOrTLeYU/Wyy12Z95hhPK59zCP1OzK9sBtt6+jx2piFPuHTBrBuRCvqNVAa/UkbjsCZ2tkxbhcPISkEBkUTij4ZMn8fyetDAFlCDjFUmKRgH+nkta2ItXaZR2sGOirZaJZMo/pKH5+vjTWzc6SuFi9FP4yj5yvB5cp+S5o+4O/XKmLEwNsRr7JCBmWmRiw1MqjG1qWNxEFy2EWvqh+FXubrXwZFCym3dF4hCosI2y+srqAbEZkD/9haBiHmGjU2WSVHaCFYC/zSwI9d45yAx22LUYnf+mg6I5FraVzHLQ7XDBNJT09Zu7STTDuVyUalO4b75cMXEt3l0vDlIjkgFTKIy4oGPHEHA19qXHf+2RS/H5j7rEq6WsBbZFrnlTB5aszxQj2nTfMVlwl/7PC7FG81Mz5NoTZjBZrysuELwppekBaZjSEZvASyeI4EHswO8cLP6PzQlDABrrRJHYaMBB05ATokRuEPKI43j1ruXzLDFy5WeiT8JiWkuA59CliMqZq4Dn/p32qkmdNv71QN8fyk/HO1pAJSTdk9jmCVVJDRMfmfFPazdlErcXi+tM0SRlP4AwU25iCmqyMlz9PTKlcRgS6BCsA72r/oJ3VanGT6DUxQyzeS8tpZtkHpy0iVKcrxxZ+GgAGQ0d24nlSdHNvUFJ4vEc+sH2781oYOZE2yoEEzyccoAQvnqt/uSxuVCxuXPPex1GJZLmAdfLSlacv7KEfIQlQSsUenYVkBXkxJeA1v/9gWXbwbRr1eQj6KSNZPSmJ4HoYRXx9wLJBiCNVNsdkBcL8+DqLcZ3BjKKU3dRT6tvn257HFpsUP6DtpylcEjjt0S7IKmVUo7veu9ifeHl3h1GyXh7YF+Jazb9xzDtQlUF2oLkufuxalpbGWXm+hAvdSe3oA6t7zT8CQM0fvrvXHe0pGvwGGhZ/AtFLVvl1ZWi7WhWFgL/RJd+Dc2GCdisNFiNlG3FjsZSkBo1pDJ0ZGVGQ==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR11MB5739.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(4022899009)(376014)(8096899003)(38070700018)(13003099007)(7053199007);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: gW6I2jvuAZc9HSXzq8AHONqHyGXBxtceRXbH6l/YccdImzqe4xlLJ6Cd6eo8N1d+SCHNToMdVPjgtqbAcUVESEyX9CLJ6Md7XpVR7c+zuxVe9gPJzTlkpSUYZJAN8HP8OACFI/wvqJ+Q06K1RGzIAvxjXva3fIBDb/IK8Vtycv+mHwnrE/zElx/bQKxEkzzruDLrwT73R8d1EAv/zIlBJynP74Z1zKnvYoLC36zJxV1LjCGx+eMCwKD75UYZEtXLsyA7LglZuIzEkUdFTp3zeCISJSgA1TiYtaW+ZSyk02kpENlEFCps+Zk4lS3vlXT2PibOUlMvYpL2Trq9jgoNzDFbVjVkklYhM8pNn2dIgbQuPZwWAi9jrkxrMWgYu5/GvGE2Q1ZR7l1ruOqNVIQOR4S6svF4hwMMzel7wSwRojkaqh9Ov/0VWuf5ZxIu48vUMtRCffqt3HMknIp98lxLwEkk+0JzHu9h2/6/MTLnbTzFdMPChmjoGieDPZBa076wdekd1G3BtQ1CVUyx/3FEo/j30xCdsLbpbQDaOpgWR09MrvODvBrVaM9N6rai00NbcDrT96+ETG63vCrmbPWl9w85MDftYFirrCR8HnvBPKHA3q5+AbVpQcYps73OulnM4sUIkLZqLN2hNOiMPxVd5ErpgAqO0J0ZLt9HV+ZX+6pz/f6fMgs3Vr3T9ofHRAomPnJ8XcUNFmHUT+0i7hV4DqDtJ5iqraQ5G/9CCw5RDVlUpwF+DqQhA4jIGCdgrZV5OObSqaXyAoE9xsS1ckTfvPk9ZaeXNOWIDX5RBQDwsFPG0Vdr9KOfrIus1wyqJrBMNukJ0Hjruoh0sfw6ywRC1w/bVt8gcn2ymjfvrsQf8VGRkfow2A/80sqlAQOjm/3svmByTckTnz7rO9utCE6fOsuldz7z2aNsyr1fqpBIS8ALnUS+Rb7PrvRCM0/xnmHzCKiArjv6TgvbaA6VnfXTwszuYdLEMpkkCdJMJ4ko/w/yxZFH34+RgXdboj1VLyXwbrUNbOu3keI+h+7+ZhiUlmAmQcajXif5kamCBcJh0LYa74nItDvVa5HJfpWd1VzqZxMbAfOzkWAjPPXw4OGg2b6ybu8KaIp36wajaXw1L1yi/vPBve7V7m8XPl+g44Rgesl7mcooBzAK0iTP3+ZqqXItFcMpbcvUz0zEMtiWf5Y97SdlFlEVgDJV+7XLgO5E2N72K1NT2j1xEaYuCEX2OCIXL+TuYKNj5exk/CDIP8EtSpT1Kt7sbHS30E+1ST4AB8Yzq4Flj0Ia1BpW8e91yi/JcPffdUottb93D8AQETi9YFFONFMzjfgIVHbaRF595gQ4nkqRhPKwTRQDDpzWR1hStmlFw2XlqnTHEiK6iZ//GplQIOTJLDbo7GdWST8TXcO8NnN1kK8Vku3dpAmoRmHaghjkJJ9X7PUG0M2bKZe20rHsRZ2oUof9QH9KNx4Z9hgayBgckL/Omw6LPcLkSTj5h5UwlfuXDZiKicBoKEB7WOjCI4vjPEtLPq7WbS5glu14/2DJSo7QhgfbDQgGdUOip4Xeatvy0dCT+/dD1e+WOPILNeLuCxhEZBF01EKeWPvBz7QStONCpKG//TRl4A==
Content-Type: multipart/alternative; boundary="_000_CH0PR11MB57390AADD3F4F7A449F8ECD29F5EACH0PR11MB5739namp_"
MIME-Version: 1.0
X-OriginatorOrg: entrust.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH0PR11MB5739.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e8cc53c0-d5b3-4f78-080d-08ddcaa6ca96
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2025 11:39:46.8205 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f46cf439-27ef-4acf-a800-15072bb7ddc1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: JPP7Ty05x7ZsrCjDTmNCf9qHDsvNs3FYEkPqaXTkEHzlW53Au6hD7TUluEZOcBED9mc41vu2lpvrAVbvsmK9OfRCRvwsjEhMevvgx9B9zks=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA4PR11MB9129
X-Proofpoint-ORIG-GUID: jBnuQaxh2PNxUvtsOtFENHZkgMeXiK-8
X-Proofpoint-GUID: jBnuQaxh2PNxUvtsOtFENHZkgMeXiK-8
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzI0MDA0NSBTYWx0ZWRfXw8zLMlsEuHlZ xmK1G1VRbku6XnRg58UVifiM6cUliufhFdKz/3lxKK3uu7XTOCNsSrCalI7MHQLRidqdTnFyVD+ mSZUQp+ysWMf569kVRL0aqVjjKcX3s4A9S0Z4EbT52PKZV9sYJzUvBVCwczIgBlOB8MB77+2cov 6aDprJFTrOBQKy9oo/Kk4sKt5jHBo5XMXdO2o3ExpocDlUI5ttYX49k+DQzL2DkwORn9u/quhI+ s3r8c7WgELC5uwnFx9/U5KeI+J9dPUu3TxpDDR277tLgX3ho5vh0h5ka30srvWtUUlKw+Zrto5u IK/4lNnx1nffeA/P/gRsm8a+rBc0oG1J10qxbtiQQJIedvVI9PPtPaNANJo8wB+XIDn+fupHru2 CngcbkJ7
X-Authority-Analysis: v=2.4 cv=IuAecK/g c=1 sm=1 tr=0 ts=68821b88 cx=c_pps a=2CVVnymFL7BC07yZsg0ohA==:117 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=Wb1JkmetP80A:10 a=FEbzDYiKvWYA:10 a=UVq9kkz1AAAA:8 a=lyf1682xAAAA:8 a=48vgC7mUAAAA:8 a=J18b50JsuxnixmpOIvcA:9 a=QEXdDO2ut3YA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=ujL6n8UcnjkQpF5M_vwA:9 a=T6dLkAcrGsUgzIx1:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 a=lqcHg5cX4UMA:10 a=22KFQSEqVl9V9wpDgu0m:22
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-24_01,2025-07-24_01,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.21.0-2505280000 definitions=main-2507240045
Message-ID-Hash: ZUHDIP6W55ZHA4YWQUP35JTR7ACUMUIY
X-Message-ID-Hash: ZUHDIP6W55ZHA4YWQUP35JTR7ACUMUIY
X-MailFrom: Mike.Ounsworth@entrust.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-spasm.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: [lamps] Re: [EXTERNAL] Implied vs. explicit signature digest in PKCS#7 and CMS
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/gwlT66TULmkIOUuvpCvugEYhwxc>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Owner: <mailto:spasm-owner@ietf.org>
List-Post: <mailto:spasm@ietf.org>
List-Subscribe: <mailto:spasm-join@ietf.org>
List-Unsubscribe: <mailto:spasm-leave@ietf.org>
Hi Viktor, This is just a quick opinion, not a well-researched answer, but I don’t really see a problem here. I don’t see a need for consistency across algorithm OIDs, as long as each signature algorithm has a spec and that spec clearly defines the behaviour for that signature algorithm. For example: RFC9814: SLH-DSA in CMS says: the digestAlgorithm identifier SHOULD match the hash function used in the SLH-DSA tree (as shown in the list below). … The hash functions defined in [FIPS180<https://doi.org/10.6028/NIST.FIPS.180-4>] and [FIPS202<https://doi.org/10.6028/NIST.FIPS.202>] MUST be supported for use with the variants of SLH-DSA as shown below: id-slh-dsa-sha2-128s: SHA-256 id-slh-dsa-sha2-128f: SHA-256 id-slh-dsa-sha2-192s: SHA-512 id-slh-dsa-sha2-192f: SHA-512 id-slh-dsa-sha2-256s: SHA-512 id-slh-dsa-sha2-256f: SHA-512 id-slh-dsa-shake-128s: SHAKE128 with 256-bit output id-slh-dsa-shake-128f: SHAKE128 with 256-bit output id-slh-dsa-shake-192s: SHAKE256 with 512-bit output id-slh-dsa-shake-192f: SHAKE256 with 512-bit output id-slh-dsa-shake-256s: SHAKE256 with 512-bit output id-slh-dsa-shake-256f: SHAKE256 with 512-bit output That means the obvious digest function is MTI, but it does not forbid using different ones. That document does not specify the use of HashSLH-DSA in CMS. Maybe another document does, but I am not aware of it. And draft-ietf-lamps-cms-ml-dsa-06 says: SHA-512 [FIPS180<https://doi.org/10.6028/nist.fips.180-4>] MUST be supported for use with the variants of ML-DSA in this document. … However, other hash functions MAY also be supported; in particular, SHAKE256 SHOULD be supported, as this is the digest algorithm used internally in ML-DSA. That document does not specify the use of HashML-DSA in CMS. Maybe another document does, but I am not aware of it. So to my reading, at least on those two examples (SLH-DSA and ML-DSA), it is sufficiently well specified. --- Mike Ounsworth From: Viktor Dukhovni <ietf-dane@dukhovni.org> Sent: Thursday, July 24, 2025 3:02 AM To: spasm@ietf.org Subject: [EXTERNAL] [lamps] Implied vs. explicit signature digest in PKCS#7 and CMS The signature algorithm OID in the signerInfo signed attributes of PKCS#7 and CMS may in the case of RSA and DSA be digest agnostic, specifying just the public key algorithm, even though a digest is ultimately used to perform the signature. The signature algorithm OID in the signerInfo signed attributes of PKCS#7 and CMS may in the case of RSA and DSA be digest agnostic, specifying just the public key algorithm, even though a digest is ultimately used to perform the signature. This is a result of having a choice between: id-dsa x9 1 and any of: id-dsa-with-sha1 x9 3 id-dsa-with-sha224 nistAlgorithms 3 1 id-dsa-with-sha256 nistAlgorithms 3 2 id-dsa-with-sha384 nistAlgorithms 3 3 id-dsa-with-sha512 nistAlgorithms 3 4 id-dsa-with-sha3-224 nistAlgorithms 3 5 id-dsa-with-sha3-256 nistAlgorithms 3 6 id-dsa-with-sha3-384 nistAlgorithms 3 7 id-dsa-with-sha3-512 nistAlgorithms 3 8 where: x9 iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) nistAlgorithms joint-iso-ccitt(2) country(16) us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) or, similarly, between: rsaEncryption pkcs-1 1 and any of: sha1WithRSAEncryption pkcs-1 5 sha256WithRSAEncryption pkcs-1 11 sha384WithRSAEncryption pkcs-1 12 sha512WithRSAEncryption pkcs-1 13 sha224WithRSAEncryption pkcs-1 14 id-rsassa-pkcs1-v1-5-with-sha3-224 nistAlgorithms 3 13 id-rsassa-pkcs1-v1-5-with-sha3-256 nistAlgorithms 3 14 id-rsassa-pkcs1-v1-5-with-sha3-384 nistAlgorithms 3 15 id-rsassa-pkcs1-v1-5-with-sha3-512 nistAlgorithms 3 16 id-RSASSA-PSS-SHAKE128 pkix algorithms(6) 30 id-RSASSA-PSS-SHAKE256 pkix algorithms(6) 31 where: pkcs-1 iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 pkix iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) nistAlgorithms joint-iso-ccitt(2) country(16) us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) More recent algorithms in CMS are often "pure" variants, that don't employ a digest. This necessitates an implementation kludge, where for the non-specific RSA and DSA OIDs the signed attributes are implicitly signed with the same digest algorithm as the data payload, while with the pure algorithms no digest is used. On the other hand, with the RSA/DSA algorithm OIDs that do imply a specific digest, there is then a possible conflict between the algorithm used to hash the data payload and that used as part of the signature. Do PKCS#7 and/or CMS allow RSA or DSA signatures whose digest differs from the data payload digest? Are there any other algorithms where signature algorithm OID might fail to explicitly indicate the "prehash" digest used? Are the rules different for ECDSA? (There seems to have once been a ansi-X9-62 iso(1) member-body(2) us(840) 10045 ecdsa-with-Recommended id-ecSigType recommended(2) but even that's ultimately a specific hash that aligns with the key size, and it seems that this OID never gained much traction). Another way to ask the question, is whether an implementation should hardcode which algorithms don't prehash the signed attributes (EdDSA, SLH-DSA, ML-DSA, ...), or which do (and implicitly use the content digest algorithm) (RSA and DSA). And also when it is OK for the two signed attribute prehash algorithm (if applicable) to differ from the data content digest algorithm. -- Viktor. 🇺🇦 Слава Україні! _______________________________________________ Spasm mailing list -- spasm@ietf.org<mailto:spasm@ietf.org> To unsubscribe send an email to spasm-leave@ietf.org<mailto:spasm-leave@ietf.org> Any email and files/attachments transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If this message has been sent to you in error, you must not copy, distribute or disclose of the information it contains. Please notify Entrust immediately and delete the message from your system.
- [lamps] Re: Implied vs. explicit signature digest… Kampanakis, Panos
- [lamps] Implied vs. explicit signature digest in … Viktor Dukhovni
- [lamps] Re: [EXTERNAL] Implied vs. explicit signa… Mike Ounsworth
- [lamps] Re: [EXTERNAL] Implied vs. explicit signa… Salz, Rich
- [lamps] Re: [EXTERNAL] Implied vs. explicit signa… Viktor Dukhovni
- [lamps] Re: [EXTERNAL] Implied vs. explicit signa… Mike Ounsworth