[lamps] Re: PKCS#11 and signature context (and seeds askeys)

Tomas Gustavsson <Tomas.Gustavsson@keyfactor.com> Tue, 19 November 2024 19:17 UTC

Return-Path: <Tomas.Gustavsson@keyfactor.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EF4A5C1D5C44 for <spasm@ietfa.amsl.com>; Tue, 19 Nov 2024 11:17:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.603
X-Spam-Level:
X-Spam-Status: No, score=-1.603 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, 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_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, URI_NOVOWEL=0.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=keyfactor.com header.b="Ip/BlzCe"; dkim=pass (2048-bit key) header.d=keyfactorinc.onmicrosoft.com header.b="WbQKY4YD"
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 flf1R6WANvYT for <spasm@ietfa.amsl.com>; Tue, 19 Nov 2024 11:17:15 -0800 (PST)
Received: from mx0b-0041f601.pphosted.com (mx0b-0041f601.pphosted.com [148.163.143.136]) by ietfa.amsl.com (Postfix) with ESMTP id 94382C1D5C4B for <spasm@ietf.org>; Tue, 19 Nov 2024 11:17:15 -0800 (PST)
Received: from pps.filterd (m0365590.ppops.net [127.0.0.1]) by mx0b-0041f601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AJIw8IR017433; Tue, 19 Nov 2024 19:17:08 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=keyfactor.com; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pps1; bh=quAAlK1VAIozE+ySsgMnAf9Jbjrry Rjxg6qrw5Al2iQ=; b=Ip/BlzCeEmJM/bVSP7fOP5dyWJ+heQa9j7RF1ycZ1a5es ytAKkW4JQDj1nTBToJ9HziqAmLZiS1clEvqu4JqyjQgwNLz1zHMTP12tFG1j7/J9 IqX6urL/OgdxChlhZBdtEITNuAR3WeSIyMfS38IRqpITQDdXo36QSOoADg0wjn+v Tn2+50JOTthtN2qS7U5fClbfjZ5ic0JZ8uGce0xr8k+3CajxlxqDo3xIUUrc83SA 2fLuvBxLy7h6YntNegpDD9GDUV11tBnpjxxi6edjPKRS/B8VeoIfQxlN3ro6j9Xm 8tkIf2JKQRI2j8w27gfB79PXv+v7ihq4BLzfuGHRA==
Received: from eur02-db5-obe.outbound.protection.outlook.com (mail-db5eur02lp2113.outbound.protection.outlook.com [104.47.11.113]) by mx0b-0041f601.pphosted.com (PPS) with ESMTPS id 4308yv16um-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Nov 2024 19:17:07 +0000 (GMT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Qi4vusGTPQt0PEYOPhoHDg8BzWCPZeja5eniKF5m/Auf5WChHbAeOqNf6dv+sbnMAWPHVVoX31mINUxpLInFxgRogQKBLyjFSDb3KKS1acRZsmnk9aRfpQdccgJ0aG+ZsxCH/yJRsk01qHAuhTuaobO9hCoAm3Q2Le2oM4i2Qm++qOn1CrcdoNPzW2TrMz4M+QXKgYo5kjaaVD4y1K0jDFZUAZUzBMGQfq6bFAh3/rS3tX/6CAy3tCa8bb6w5EFU07BaSYSWoABGY7WI4j1AtEZOvLoljHOsp3kS5CPh2js5IGDdAI3PqGjoat3+4n79LzuVVqnhluv5NHbtNPU00w==
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=quAAlK1VAIozE+ySsgMnAf9JbjrryRjxg6qrw5Al2iQ=; b=Irc8wMzeSIqafUIh6M9HsLqRhWUdEIWA5L2xF0GCq6Aqn2exVlSW6k/kzPUwpHy4CS6Db1qJ0ZvaCsBMr6cXHKiZ/saIaYUccFxcugr9xYh6qekM/RAy8s9mOv876UhOu+8xCvcbblAQNShZjVdyNAhYk0y90kjJRAUpwupH0GZHWhwo/07n7zuTHvwLKJ5nnTMXZyECuVDo8m9vehWkWIP+5g7TWp+e97S+62k+wTBr2uCcVlpV4uTxK8wYY0E+gorTCA93BAAbIvSvLPAO/iEtYdgmM0IaAYplMnZxddeFClwFLk334GlBP7pBbD5i345suTaOa42kv/dbpwXNsg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=keyfactor.com; dmarc=pass action=none header.from=keyfactor.com; dkim=pass header.d=keyfactor.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=KeyfactorInc.onmicrosoft.com; s=selector1-KeyfactorInc-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=quAAlK1VAIozE+ySsgMnAf9JbjrryRjxg6qrw5Al2iQ=; b=WbQKY4YDS60Q9xG8o2l1txZjc7U0ts+eE+GEsBUMuGxYRi+/ODb83wFtLfYnEdAA3VXbBQKT4BkIq3N3z2u/t+jdBim1U16uNy/2puQ3VJQOK3xNfHJVt6n99U/kUScZ4CR2uGfSpeALC+Dxc+9pRsgRSu/CY5wrb6F/lK2ZqNPb57aY0YwVWpKB8LioHcbTcv6LEhhaGfa/5pUy8R/yyNtS9Tr0ErL+5blMNbeUOFgRGkzpnxMDSzWuLJ/06eERtTcpWJZ6gWjOiXpAxN/gtRIukGUPYH5HXy7uNPVbuTKgeNjEG5mMZLhTfpuhJV4989s3Fqb+F7/mVcCsfDYQjA==
Received: from DU0PR03MB8696.eurprd03.prod.outlook.com (2603:10a6:10:3ef::5) by AS8PR03MB9093.eurprd03.prod.outlook.com (2603:10a6:20b:5b5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.21; Tue, 19 Nov 2024 19:17:02 +0000
Received: from DU0PR03MB8696.eurprd03.prod.outlook.com ([fe80::41ec:4a7:c99c:8395]) by DU0PR03MB8696.eurprd03.prod.outlook.com ([fe80::41ec:4a7:c99c:8395%6]) with mapi id 15.20.8158.023; Tue, 19 Nov 2024 19:17:02 +0000
From: Tomas Gustavsson <Tomas.Gustavsson@keyfactor.com>
To: Mike Ounsworth <Mike.Ounsworth@entrust.com>, "Kampanakis, Panos" <kpanos@amazon.com>, Sophie Schmieg <sschmieg@google.com>, Alicja Kario <hkario@redhat.com>
Thread-Topic: [lamps] Re: PKCS#11 and signature context (and seeds askeys)
Thread-Index: AQHbNR6mNQ+E0o7ckEmakNqzUBlzvLKz1jcpgAAin4qACve2gIAADbI8
Date: Tue, 19 Nov 2024 19:17:02 +0000
Message-ID: <DU0PR03MB8696FA631D4CB3D58B17D50A86202@DU0PR03MB8696.eurprd03.prod.outlook.com>
References: <caa3392d-c04d-44c2-93f5-120c2c23db87@redhat.com> <CYYPR11MB83882D95DB73A8C64E695B37EA5D2@CYYPR11MB8388.namprd11.prod.outlook.com> <6e97814d-2d20-4628-a979-cc53e918787a@redhat.com> <CAEEbLAadOmfyTHNKOgP8zRFCdU8gOhuHGEdtwsOK-VB4-UD7Zw@mail.gmail.com> <773b18d163584293ae8382b38b2f4826@amazon.com> <DU0PR03MB8696B517263C53453C2BC47A86592@DU0PR03MB8696.eurprd03.prod.outlook.com> <DU0PR03MB8696C8EFE0F2FF2534CB77F886592@DU0PR03MB8696.eurprd03.prod.outlook.com> <CH0PR11MB5739F0819BD1B33CBB5CB0A19F202@CH0PR11MB5739.namprd11.prod.outlook.com>
In-Reply-To: <CH0PR11MB5739F0819BD1B33CBB5CB0A19F202@CH0PR11MB5739.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
x-ms-reactions: allow
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DU0PR03MB8696:EE_|AS8PR03MB9093:EE_
x-ms-office365-filtering-correlation-id: ba2f045e-608d-4546-ccc4-08dd08cebf3d
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|4022899009|8096899003|38070700018|7053199007;
x-microsoft-antispam-message-info: JZYo6ba+I0xxriRmLopFtG+fhEOy8fMuH6saaQLBjUbwvUAs/ZeBBMA8x7nUM04vA6AKj5whN/83ny7ySEG+xhkzbVXt1b4dVHzZWieLw8yHJH5D73G+NimhJjJJRVAQsMBLbYt3chJnQ+w/XSRm8LPomEFbecXgYR3xWY9Q3vU2X0Jy/GXcIILtHLtydJL0uHCuLdor3igibh5l5lPC1LlF56ruNV9nNGlfVm13jWeCCweEDWCD0Lhk/033Tn/E0I6oaJJg6ny05E6E4eHWPLNhdaUPWnMdjSN+b5IcJuYQLREEufBWCXXKzRU9UqmQp/8akVw0Zsll6idIdnllC5zsrBjA3qm+ruadeNflhfAikgomoxCyQTPC166vvcLulU22sd14Lt+8hKqGE2b1gm1rKYkxwvF9M8gQHZwC77+kFez/CtRk/FKCUk+RWFa2GZ4T6SoDYaywVy3KFX2qAYJ9i9c0a2TZD7vWi7SMELaKqCp8nuINMkbLXTpiMs7LzyoTK27GhaupiproD37EHzBm9HVg2oEdIaRILLJe5qW+orpgRzUNquGN39u+8gi7KDsVmvKPBdzHEiwiUw4wH/ubSOD7av7womIaEUJbizFn58xHVyM810T6SFm+/mVVhiH69r69i4/G5WOKMxceDKiAwvVFz9WQrv466BQ8RZ/SeWpHr2iErL8dSSdifhf4Jkef2OcYhr8yS0cqtRGt7pJwSD8OlI4SZStMLZyfkJ6mCIMAtgIRY47Mmmv4H+3BR9gE/4GfWx0VT8lZbe6cjQA/xAVi9tM+mOU3X9JnWg5mL5PRAE9URB/t1pw2BlyxwAQ5nk6vinzibA1iQSMfzFUIZiIN1gTlhCAhhcQN1cF3XiAmc7cVTcpKyRN5eOr7vnyaxVkzBL9g7Mbv0mp4Kmu75HN8zLNlX8ca0zrH7hbwkWzvsULFgiPcZjL5BsDDR4ZiHkyqc5pTdeJlr3zn+H1riYnz8lXnc+7KUtAdUHzTSbK5bsdKl7gL9BNH0Oldx7Xkw+Q2Vy7f2SOgHEQZN6auPnSIzp78vfW7JavG54vRFMr8CZOnYY2m/JpDDXCs2+vXFpD1tRbI7M8+oFEfvmOsXK65sVnr3CWTM/gOeMyWnW19GwAZ8aXeo2n+psf4N/z2/h/oBHRQrWtVHiALtZUo7jc45nRxTd7bFdyn9JRAT5W1wIIjlShHRpl1zxQbqQTgvlcBkPhj2Fij3nlj2Ug7AaDfn+YszqWjvpM3pgKYOKQyqYR+YC2bmDHhVrxbFd2hfFyHMKQ1RgGJT1ta+6MWr7fXBcrPOWZ2sWzVlczBheIJugNbkD7+S/zkP+CG
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR03MB8696.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(4022899009)(8096899003)(38070700018)(7053199007);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: KFrVoH0YJ0zIHWjn4tkhZaw7MrigB6m9RCDDA+5pDA43XuXUULCf2PAOZH5LPOr77aKLyF3IhimVmPn8pNtXdfHMMdplVcJz+GGugIYmbt9OFy8hDvjycrZuUHO596M7CXTvsUaVFxoyrOE8qI1vU78eN8YQxK9iAuR0OiDiem1GdW2xaYtl+1/y64hcAZq4RXn6i8xst4pnRv6ytTt/9TVfW7uzurGeMZgtYTnA65vRRenGZU5n+cQ65qjm379EXcuPnEo9PIalViX67TCI83V4buEJ7KQ7RHCW8kCUqIwn8Cs8cZLGLI2raf//19sbSeUm0eBIlJ3y5Ao+wKQy1LuRaRV1Wu9vFu2rFoXI8uqf3shR/NZKN/JfdpjRZidusdQl4sMPU3xSeYokHWPUfy4Tcgiz3YHhbc3wmis1PXbbiH/ozujeAQv5FlPwTbQ4j10rV99MiTMcafhsmoqcYRfBJ849ambuRdEfWSRxGDIel9PBH+FqbmkM6FtuuvW6dkr1CWoQBB18cqKSVSrYW03OeuJFUlfMlw4n9d0WC+cR+wZbaZWKvF3Rbzams/nxfPFx6196yTBohFCuoBn87y8e/o0Sgo1ys94Chzg159/FHDh+8IMl/U4KaKjP67dqz/3vZwko2MPprezTLrAg7hJrvKUfaslv90qcBp4qxDRYQ6YDf1flkRlngbypoOqz83JBjR/P4+n8vxBE3NE3S8GFNs1LlxWpHBYHgabH0xqwHaBMhQIUk6R4h2l5nlgRufyHpgPkNWOxtC0ZN7i4qyuChemSU/XXcBF9642Z3ZoCxOYxuKKQhj+lVyRlKP9Ae1Qlg0SXz9N+IfFv0WQsVlEp7ra87MiToY9j3zzHjfUdUhHNek7mZiBTbXiHQT2D+wVWSbQYLe//NkOUoCQ7/rxX0WqxCl9LKyz+ToTLVC4X+vFLE8nhK3VwnJzpG+nprUlgv5yHqK2JyF7luFbfRaA5o4Aq9SQHePIyLS2/7x2OI9Tyxgj7fpGj596BzPH5BiFJDletR1uBhgCGumbM7WqyJNaZZ1MhUcSYFaJIzODeEJIqz2KREbUSdcL6+1fH9i72gal4w6lJWLsheFTHOm4O5JHoAseCqQPftchZSkmX2RJT+wmX53k3PEbTrrsu9lX1lyMFt6XBsyC5WuL4kXZesuNyXSDqHW4ECvVHfnVeUSCiciNdWlr+9fjug5qCTXhtOiDJHhyRM3e3kqpJjAc6vZPp1Qck6SpMlmwANZPOMdqmzeCh+F2UWveMFA7X6N4+S4cDQPwavV8Cf9oltW7u/sAe2ZK8Rhz244BjCQs84U9gbiKCJyHFSdthQF92AKdCRBt4NgBpNUE2zbjzNxaspgskAYz1vOtDXHe7boA02vW+HRiFx8iCJf5EklUku+9rKIjJkkftcovWAmDHpY8QjOsITiHOO/3IZB4Us8e88vgr6DHftfDgqvKPxm4Bwto7ffIah36cpbKLm+OcLhI7tI4V6prD6dDjbXpWq/oLoGGeykP3ucqe1kzMa2AVy/nlu6y73PXswMYs2rP50jEmxF5ln78OyuaUUWPXTmw3qBFVR8OqUi+HloQUf8eduDJEhwVmm7PY8Yzs/Ni0qs+EtnPWlTjPGDVIkzueHkw=
Content-Type: multipart/alternative; boundary="_000_DU0PR03MB8696FA631D4CB3D58B17D50A86202DU0PR03MB8696eurp_"
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 1FX5h64QKldoXjeqL951IjJTBO8DE+UpgVaePH5sxtd6ADUCMiWkSygP4aQMVqAjdBJ5PVT8F3SCHvDEI6QRdcIlSkgLkHAsmgrhV6AmV0kavHMDev1+tzHVmi3uoArBLSt3JaAl9yELm8rNNxJKDQ/vmzsLW/goT6DKr+IvSkzQgCca0FDBrXp+Sf2k7AXFyPx0UKLBBwby9YUPISQZpJdl0wD9p1J7WqaGNTMj7lE2H95ZX1TieDtOQbjjUt3LMl+TIsOVWZoGSecioqz0PT3KgTopLaD2CHE43svn3Pe+D3I0AZy3Za8U6nLT465MGUnwRBXklTYPBFDjFTAiF9+JuySRzyWBh/zrHfOloHQtRw4d5kDf6ma0ASXPI4DI+GNq6fB6NWALa2H5NK6kJ+f6HqeDaSkb2Ol3X+bCHS19pGlosMUKbh6Qm+dP5fpWI870NM4c1s6DvTeK4aPRDT/OZgnC48R/ulyOsmNxkTJoGmcZgdqt4DYBUA/3YsQdisZu3aUNQPSwEZTwLy3nMSU6AT8KylXvMkHqsPuc9PcVXmO6kk/PHTFXf6uZXuE6cYVD5NREO/7UhRDJgh2mAHL0tjUX7AdZa5SrfFX9La8k2o4X+/qhVz8JnyJ3K5EE
X-OriginatorOrg: keyfactor.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB8696.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ba2f045e-608d-4546-ccc4-08dd08cebf3d
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2024 19:17:02.1223 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: c9ed4b45-9f70-418a-aa58-f04c80848ca9
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Ssq2VjKOI16wd3tX3YhUl3lWUWA24nXlgl/l8X0M8VVFhGCXay29rzBRBoMDpM/rsUE42TR7qVJ3TCk3Qkjwm/xJ8CZ7QoffH/CdrwvChy0=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB9093
X-Proofpoint-ORIG-GUID: n03BLzsDY9QiFlUYkTD0hCmwoMfkw1Qh
X-Proofpoint-GUID: n03BLzsDY9QiFlUYkTD0hCmwoMfkw1Qh
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
Message-ID-Hash: FXNRPZSHDYPPD262QGTLAZ3BTFQX2JRD
X-Message-ID-Hash: FXNRPZSHDYPPD262QGTLAZ3BTFQX2JRD
X-MailFrom: Tomas.Gustavsson@keyfactor.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
CC: "spasm@ietf.org" <spasm@ietf.org>, John Gray <John.Gray@entrust.com>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [lamps] Re: PKCS#11 and signature context (and seeds askeys)
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/LjmIsUE3tgTiV2Z1Us_CgQfFvLw>
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>

For some reason 2 doesn’t make me feel comfortable. Redesigning standards we have today for signing just doesn’t sound like the fastest path to wide spread migration. And making a fetch of the public key will  severely affect performance, at least says the testing I have done with p11 for the past 10 years.

Cheers,
Tomas

________________________________
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
Sent: Tuesday, November 19, 2024 7:04 PM
To: Tomas Gustavsson <Tomas.Gustavsson@keyfactor.com>; Kampanakis, Panos <kpanos@amazon.com>; Sophie Schmieg <sschmieg@google.com>; Alicja Kario <hkario@redhat.com>
Cc: spasm@ietf.org <spasm@ietf.org>; John Gray <John.Gray@entrust.com>
Subject: RE: [lamps] Re: PKCS#11 and signature context (and seeds askeys)

I largely agree with where this thread landed: It’s *probably fine* if P11 allows HSM vendors to implement the ML-DSA.sign as either an internal-mu or external-mu.

Two additional thoughts:

1. Does “burying” it like this rob the application of the ability to control whether it wants internal-mu or external-mu? Maybe this is not desirable? Maybe if your P11 driver does external-mu with CPU-local hashing, then there is really never a reason to want internal-mu (HSM-internal hashing)?
2. Computing mu requires knowledge of the public key hash (tr). If the P11 client needs to make a network call to the HSM to retrieve tr, then doesn’t that completely negate the performance gain of CPU-local hashing? Shouldn’t P11 provide an interface whereby the application can pass in the public key tr, if it has it locally available? (this makes my security alarms go off due to the risks of passing in the wrong tr, but I’ll suppress that alarm for now).

---
Mike Ounsworth

From: Tomas Gustavsson <Tomas.Gustavsson@keyfactor.com>
Sent: Tuesday, November 12, 2024 12:42 PM
To: Kampanakis, Panos <kpanos@amazon.com>; Sophie Schmieg <sschmieg@google.com>; Alicja Kario <hkario@redhat.com>
Cc: spasm@ietf.org; John Gray <John.Gray@entrust.com>; Mike Ounsworth <Mike.Ounsworth@entrust.com>
Subject: [EXTERNAL] Re: [lamps] Re: PKCS#11 and signature context (and seeds askeys)

I'd like to add though that in my experience the P11 client doesn't have to be CPU-local though. We have a normal case where the P11 client is in a side-car container to the main application container, so the payload still goes in i. e. a Kubernetes
I'd like to add though that in my experience the P11 client doesn't have to be CPU-local though. We have a normal case where the P11 client is in a side-car container to the main application container, so the payload still goes in i.e. a Kubernetes local network. But that should be able to handle more data. Rest based HSMs will have to implement a µ based API if that is the road chosen.

The Java Provider API have a initSign/Update/Sign architecture. I don't think there is an API taking a ctx currently though (please correct me if I'm wrong).
Tomas

________________________________
From: Tomas Gustavsson <Tomas.Gustavsson@keyfactor.com<mailto:Tomas.Gustavsson@keyfactor.com>>
Sent: Tuesday, November 12, 2024 5:36 PM
To: Kampanakis, Panos <kpanos=40amazon.com@dmarc.ietf.org<mailto:kpanos=40amazon.com@dmarc.ietf.org>>; Sophie Schmieg <sschmieg=40google.com@dmarc.ietf.org<mailto:sschmieg=40google.com@dmarc.ietf.org>>; Alicja Kario <hkario@redhat.com<mailto:hkario@redhat.com>>
Cc: spasm@ietf.org<mailto:spasm@ietf.org> <spasm@ietf.org<mailto:spasm@ietf.org>>; John Gray <John.Gray@entrust.com<mailto:John.Gray@entrust.com>>; Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org> <Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org>>
Subject: [lamps] Re: PKCS#11 and signature context (and seeds askeys)

I interpreted the Oasis answer as that the HSM vendor could divide it between module and pkcs11 client. Implementing the calculation of µ in the PKCS11 client, which is local (see attached picture). If I understood that wrong, it's bad. From: 

I interpreted the Oasis answer as that the HSM vendor could divide it between module and pkcs11 client. Implementing the calculation of µ in the PKCS11 client, which is local (see attached picture). If I understood that wrong, it's bad.

________________________________
From: Kampanakis, Panos <kpanos=40amazon.com@dmarc.ietf.org<mailto:kpanos=40amazon.com@dmarc.ietf.org>>
Sent: Tuesday, November 12, 2024 5:18 PM
To: Sophie Schmieg <sschmieg=40google.com@dmarc.ietf.org<mailto:sschmieg=40google.com@dmarc.ietf.org>>; Alicja Kario <hkario@redhat.com<mailto:hkario@redhat.com>>
Cc: spasm@ietf.org<mailto:spasm@ietf.org> <spasm@ietf.org<mailto:spasm@ietf.org>>; John Gray <John.Gray@entrust.com<mailto:John.Gray@entrust.com>>; Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org> <Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org>>
Subject: [lamps] Re: PKCS#11 and signature context (and seeds askeys)

OK, but until either OASIS or this group change their mind, we have a problem with use-cases where your HSM sits somewhere far away and your 100MB to-be-signed image or CRL sits somewhere else. Today, you can get away with just sending the digest

OK, but until either OASIS or this group change their mind, we have a problem with use-cases where your HSM sits somewhere far away and your 100MB to-be-signed image or CRL sits somewhere else. Today, you can get away with just sending the digest of the message over the network to the HSM for ECDSA signing (PKCS11 supports it). But it sounds like they don’t want to support this with mu.



Who is going to convince OASIS to change?









From: Sophie Schmieg <sschmieg=40google.com@dmarc.ietf.org<mailto:sschmieg=40google.com@dmarc.ietf.org>>
Sent: Monday, November 11, 2024 1:42 PM
To: Alicja Kario <hkario@redhat.com<mailto:hkario@redhat.com>>
Cc: spasm@ietf.org<mailto:spasm@ietf.org>; John Gray <John.Gray@entrust.com<mailto:John.Gray@entrust.com>>; Mike.Ounsworth=40entrust.com@dmarc.ietf.org<mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org>
Subject: [lamps] Re: [EXTERNAL] PKCS#11 and signature context (and seeds askeys)



I would highly encourage OASIS to reconsider their position with respect to µ. Note that with PKCS11 in particular, there is another way of implementing ML-DSA without external computation of µ or resorting to HashML-DSA: PKCS11 has a stateful streaming API for signing, i.e. using a init/update/finalize paradigm. The init function involves indicating the key handle, i.e. specifying the private key already, which would allow the HSM to create a pure ML-DSA signature without even needing the external µ or prehashing. If they want an externally computed message identifier, I would highly suggest to using an externally computed µ. If they want to compute the message identifier internally, I would suggest using this streaming API and not use HashML-DSA, if only for CNSA2 compliance.



On Mon, Nov 11, 2024 at 10:05 AM Alicja Kario <hkario@redhat.com<mailto:hkario@redhat.com>> wrote:

I've talked with Bob some more and to summarise the three things raised
previously:

1. What about use of context in ML-DSA and SLH-DSA?
   A: It will be there in v3.2
2. Will PKCS#11 include external computation of `mu` for signing?
   A: No. And that's a strong position, already discussed in OASIS.
3. Will PKCS#11 allow import/export of keys by specifying seed only?
   A: Yes, there will be a new attribute (CKA_SEED) that will allow that,
   but it won't be mandatory to support it. Again, will be part of v3.2

the PKCS#11 v3.2 will also include the HashML-DSA together with
most SHA-2 (no SHA512-256 or SHA512-224) and all SHA-3 variants.

On Friday, 8 November 2024 13:45:43 CET, John Gray wrote:
> Thanks Alicja,
>
> This came up briefly at PQUIP yesterday.   I can also confirm
> what you said as I talked to Robert about this at ICMC back in
> September.  From my understanding, they are planning to use a
> PKCS11 mechanism parameter to convey the context to ML-DSA and
> SLH-DSA.
>
> Cheers,
>
> John Gray
>
> From: Alicja Kario <hkario@redhat.com<mailto:hkario@redhat.com>>
> Sent: Wednesday, November 6, 2024 1:14 PM
> To: spasm@ietf.org<mailto:spasm@ietf.org> <spasm@ietf.org<mailto:spasm@ietf.org>>
> Subject: [EXTERNAL] [lamps] PKCS#11 and signature context
>
> I've talked with Robert Relya (co-chair on the OASIS technical comitte),
> and he said that they are aware of signature context for ML-DSA and
> SLH-DSA.
> Those, together with the encapsulation/decapsulation API will be part of
> the PKCS#11 v3.2.
>
> That version hopefully should be released by the end of this year.

--
Regards,
Alicja (nee Hubert) Kario
Principal Quality Engineer, RHEL Crypto team
Web: www.cz.redhat.com<https://urldefense.com/v3/__http:/www.cz.redhat.com__;!!BjbSd3t9V7AnTp3tuV-82YaK!1VmjdTi2RMEh2PPR-m_ZtimUuuY3RAKYvFymyFQwkFzZ2KR-u3t53DxmldqWz01zdrNhQRSkT6ZGbRUIG_n3BtUCWLSlkrjq_TOkWnYx$>
Red Hat Czech s.r.o., Purkyňova 115, 612 00, Brno, Czech Republic

_______________________________________________
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>




--

Sophie Schmieg | Information Security Engineer | ISE Crypto | sschmieg@google.com<mailto:sschmieg@google.com>



Cheers,
Tomas