[CFRG] Re: Where should test vectors live?
John Mattsson <john.mattsson@ericsson.com> Sat, 21 September 2024 04:58 UTC
Return-Path: <john.mattsson@ericsson.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 16B44C14F6AD for <cfrg@ietfa.amsl.com>; Fri, 20 Sep 2024 21:58:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.254
X-Spam-Level:
X-Spam-Status: No, score=-7.254 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_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ericsson.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 JnEWuj4lR4sL for <cfrg@ietfa.amsl.com>; Fri, 20 Sep 2024 21:58:11 -0700 (PDT)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::600]) (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 00453C14F6A0 for <cfrg@irtf.org>; Fri, 20 Sep 2024 21:58:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zOsOePrlxdfuqHcXKn72iJcaD3RvkUsr26sFBp4VhyBcjF0wZNlaZWlVXn7511yb7PNtDXtRYYoG3sPdmNWr1/d+Ap8wq7yRks2OtxTy08lyRIgBitz8j5/uniGYyK7C2TLrMqq8bCfnvxnjQppv2oGIW9t1Dms2pATY/16EoewTwSklO00eJBGKACJP3nyJfvFWQpPKt7ZRBcsqcaisPwLqxugKnO1VNIVmZVLRMVEbkHLaC8gdgT4rR4K/WBksDsIA1ddSKc00764cdXgoLlzRtpnxxnzwcq9Tvh5HKSt2Z8hHERWUf8QADeYnXgBcP0IawwzDLsrwjYgUIgA0Nw==
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=KGBDYEsjHWm74LkUWjPB7l25zGhoUrG26GNqnhb0ej0=; b=qCCZtpmAIARavvVYjkXBzQiQbWBIxFzZpZncTW0ST9tyzaaIMJVuMspYlGnfydmKkZmbwMqVcvWMoqajslrZkKI0r7/TrNYouKFJUOQzsAXdN3F9rXRQd3Im3K88nZTmlhHefYF5QVjR0YMwxI2+eKe5a79qBxiYp2LVEtoOJfzYyWsqvQDNXm/TaP7yOwyd2u2UhaV7QhdfPWXI/D6F84ayMgpgaNATt/fKSOTAZ3BIvzPLsXbbmxoit3F9yLgmOnyMSVsYPa+SMji5fFBggjr9HXPYUYKQLD5Frvj0sGGNWLiY+ODoaPHY1unIOcyQV4+8LYl5a+VQ1j2m9lY65Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KGBDYEsjHWm74LkUWjPB7l25zGhoUrG26GNqnhb0ej0=; b=PVZ9kzqq56QFHykR1lf/fT24pUAZgpWXWWjK0AMdXCIVh0WJnuVLV1CaVhbpkwtJtgNDiQk84eSFAgFBl6TvqnVFRKlVG7sEs8Td5RpYps+dl9iS3mfbgi44Vc012NRmc/pR2t4OzoGQO8B1GCFEWqKkl5/oCOggVAxMYLigX8R4R3Xhsb7duXh4Uu4lrkA7ahltRXYH2IWTPFpsiPlfQG7pufbFT4IYpXbh7bom6rD4vfl2aU9u4IvjdpwCAHcmq6EmFnKhtgKTMyFrbaMzUTDlg5ycZ3EwcDXC2PBOXspKYN+nuxnYnXcydJi/MGuZJWBFjpcG+i5zbBzU9lLLoA==
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com (2603:10a6:150:114::10) by GVXPR07MB9917.eurprd07.prod.outlook.com (2603:10a6:150:121::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Sat, 21 Sep 2024 04:58:07 +0000
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::bcf3:3f45:888e:a4b8]) by GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::bcf3:3f45:888e:a4b8%4]) with mapi id 15.20.7982.018; Sat, 21 Sep 2024 04:58:07 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: Christopher Patton <cpatton=40cloudflare.com@dmarc.ietf.org>, "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: [CFRG] Re: Where should test vectors live?
Thread-Index: AQHbCvkbomwU7QduekSKv3Exw7kAirJgfpyAgABxMYCAAARuAIAAAvkAgAAi2QCAAC0VgIAAZsS/
Date: Sat, 21 Sep 2024 04:58:07 +0000
Message-ID: <GVXPR07MB96788E2243EC05BF3A8E6DBF896D2@GVXPR07MB9678.eurprd07.prod.outlook.com>
References: <CAG2Zi22ya_6h1Q_rs9Tf6tJ3qao-X2_wWhCgxoXD3OQnf+MOUw@mail.gmail.com> <20240920200220.402868.qmail@cr.yp.to> <CAG2Zi21QNTZ8rZ-j5nrkbRbrk4pdknXjdsCiLip30HjvweK9HA@mail.gmail.com>
In-Reply-To: <CAG2Zi21QNTZ8rZ-j5nrkbRbrk4pdknXjdsCiLip30HjvweK9HA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: GVXPR07MB9678:EE_|GVXPR07MB9917:EE_
x-ms-office365-filtering-correlation-id: f4239d35-b86a-453b-ee8e-08dcd9f9fb9a
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|366016|1800799024|38070700018;
x-microsoft-antispam-message-info: jJLlyuS8b6ySxcR7YntdM8KqvoBduXy3yxfEGM5BgZflAasYBFnbbPl7z+raXwh7CB7WwdnUk9iMCIkJox+LuuyEJeqiuhKk51Vx209H/oSMJ+vB5aj443MdF8gQwgf0yE1sJE72E8C9/rqmXs5AuAD+skcxFnlf731QEM6/PNcs59vxcjqoU0jGlP9MnZIGoXv8kqEmSXKkP6xKr2gKospTKUkJTQwuUt1+wR83+P2JFmH3FDMCXPXbP9PpZXTk76x/GbEEze+UjB0VMzak+gLAsk8vrcU7bovL+HKjaFWnJtaqjJMRxDrp5nD9N9JOn52DCwRNH/lGChefWeK3POUCv5AYY6SHXGjqdTn7X3JHfjVqIKCgong11fa0t2/zug7nGSUtP9tQdx31pKjuooYphe8ihb2Yh9KHU5JQjexSlzK0Qq9axYv7FGUe5gAYaYivpWAXoMH8y6ecbPHLbcEHxTB0UXXt3uNWIPOpnZsgF+NS2DhqadkrhCAPZ4ADzHq65Lxqh8PSk1GjvFxmBnbLW9THcPz/RyauyzNJsBFNKPwUVF4MRJzpAClWm2ZOct4jriJ6VAN1vYnkycd5xaQ1JC+8ETS3Qjga6wfw2a8/NQl2Hlhe+eZ33FGTB0M1593qMurBSGSiZmIatT5hX8EQt6ypM3Pp/JPfvwUcv11q+/h7bGEelxfpgC9AC5HczHeHVkBGr8gs9cEIgNyZQtrYdUpy2X+qlZk2i5NzvAxSaHC49X0j+HQPqNdpdzylYlqZ/2t4sxVkbwb2NIB7IuUE7OkzAGEFM7QzTw47nNW5quJ9oQ3n4YmDZpdpFh/iT0fmBF2p/twlp+9UzTC15miy9BkCLsAgsAn4nx2+gjzZY3jc8xlIs/Dh2m/9zDMNgwcxnMAQEvuVCLiudFkxyiNyVGTTBtGQCr/Vf+rylLB5xkLfrY0iGy3WxKHoMnEp67EQCCrZF9cMCMRIBpLbcjvK5Vl6G7zDcm/823GgY1PAiYYHO5njhSuHNkwf9GQF8npJu93QRfEjt57xxYWF8h8BfE3jzVsHNGKMjE6XXXID2wgWMxX5lTcK8nB5BVtxCkBtFQn+9mAc41zDQPxjSfjg4OCH5Do1xp13cquz7f4HVa72CSh6otjjH1emUxI8J5zWr7fyYZ/0MTS/FsheeAqKkmEPTpjGRbcuAA4KB7h4snrK3kaK/h1UZojZeBTamCMFyGOvreuEPPnC7xoVbqU1UJMRyFNhv36XvUChYdeP2aDntQmmzv+fouD62JQWgXZmyCAjNkzqn+BT9ebepg613e13vUIB/MAG7eqtaSw=
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GVXPR07MB9678.eurprd07.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: EL6TUsjzdSknk2dbefdkNsBEiqt+y9Aj9iKHVprqNlOfwymbFaRcr/8Aw2czN26yOi3VaYt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nChYDVQg5GBeihIIn8riuoc3CSjOyFtzCl4bgwDSDiK3gdKta+Lkx8RteYHuoOgoyH0Oniiml9uGDJR5Ha3B5l/f6ZmwhFY4K5Vb6C9NGmTXiQCUbeTiw+Yb9bEnTrP2O59bk0ml/jlJbj9ya7g4KrUdXMptIeJp2Ae5T+X9WGbZuBTYMsgaEu6wVmUyxuSRlyPMdUDu49rV0TesmucAJvvM+3N/0fLEf+DuyGZwXxf+yYhyCwD6wH7mGhQrPgYd7nR/juAbiqalJa1Hb/Bi/fC9T2gxGZUmq9VscD9myFjLQpW6gKqcyGhDCyh3KEoXpznNcV2T3QaNzvHJoLCPWczTB09AZ9SpwDyJl3Ah3hY0icW+uLTzoAC5tyDzxF9JqSm51ODMdleDyDh5g73ySgvaEDz9277j83dflXiJuOUNpY06m5IPlX0hYZ4dcFukqgBK4AD1j8MTiToX484LYuPGFRpCyDgw3seM=
Content-Type: multipart/alternative; boundary="_000_GVXPR07MB96788E2243EC05BF3A8E6DBF896D2GVXPR07MB9678eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: GVXPR07MB9678.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f4239d35-b86a-453b-ee8e-08dcd9f9fb9a
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2024 04:58:07.0809 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ypukte71EON8PRrOE9sLreMVeRtI/ETsLd+IPIcGJXVHE3ejqL+oIdnXqo2+GO4eBNLE/uhmFKMINj12sbvCTZuX+pB1P+xmrWGVnNxwSu4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR07MB9917
Message-ID-Hash: FQZK3WY64WADFTZOW5VQIXRNG2HRMDKV
X-Message-ID-Hash: FQZK3WY64WADFTZOW5VQIXRNG2HRMDKV
X-MailFrom: john.mattsson@ericsson.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cfrg.irtf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [CFRG] Re: Where should test vectors live?
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/VJQMAvElCUk050C7rkXdG-X7oTk>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Owner: <mailto:cfrg-owner@irtf.org>
List-Post: <mailto:cfrg@irtf.org>
List-Subscribe: <mailto:cfrg-join@irtf.org>
List-Unsubscribe: <mailto:cfrg-leave@irtf.org>
D. J. Bernstein wrote: >Instead of defining formats for test vectors, I would suggest defining a >format for reference code (e.g., Python script meeting a specified API; >can have the format say which Python version). An obvious illustration >of using the format would be a general-purpose tool to create test >vectors given the reference code---and then there's no reason to post >the test vectors; people should run the tools locally. Reference code only produces positive test vectors. Unless all inputs are valid, negative test vectors are essential for catching non-compliant implementations such as ECC implementations not doing point validation. Negative test vectors typically have to be hand crafted. Cheers, John From: Christopher Patton <cpatton=40cloudflare.com@dmarc.ietf.org> Date: Saturday, 21 September 2024 at 00:44 To: cfrg@irtf.org <cfrg@irtf.org> Subject: [CFRG] Re: Where should test vectors live? Dan, Instead of defining formats for test vectors, I would suggest defining a format for reference code (e.g., Python script meeting a specified API; can have the format say which Python version). An obvious illustration of using the format would be a general-purpose tool to create test vectors given the reference code---and then there's no reason to post the test vectors; people should run the tools locally. SUPERCOP already generates tests for thousands of C implementations meeting the SUPERCOP API, and there are examples online of how to do the same tests in Python. SUPERCOP also supports generating implementation-specific tests; this is sometimes useful for testing slow-to-find corner cases. One advantage of this modularity is that implementors will easily be able to swap in different testing tools (e.g., using fuzzers, or simply testing more inputs) without being constrained by the limits of posted test vectors. Of course, reference code is also useful for much more than just testing. The draft in question does have reference code (https://github.com/cfrg/draft-irtf-cfrg-vdaf/tree/main/poc/vdaf_poc) and in fact we use this to generate test vectors and the spec itself (by copy-pasting). The reference code is Python, but it requires SageMath to run (e.g., `sage -python gen_test_vec.py` to generate test vectors). It would be really cool to see implementers integrate the reference code itself into their tests, though I think sage is too big a dependency to carry around. We could probably remove it for this particular draft. I think Python is by far the most common language for reference code at CFRG. Some drafts require sage, others don't. You may be interested in reviewing https://github.com/cfrg/draft-irtf-cfrg-cryptography-specification. Chris P.
- [CFRG] Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? D. J. Bernstein
- [CFRG] Re: Where should test vectors live? Orie Steele
- [CFRG] Re: Where should test vectors live? Watson Ladd
- [CFRG] Re: Where should test vectors live? Richard Barnes
- [CFRG] Re: Where should test vectors live? Orie Steele
- [CFRG] Re: Where should test vectors live? Björn Haase
- [CFRG] Re: Where should test vectors live? Carsten Bormann
- [CFRG] Re: Where should test vectors live? Carsten Bormann
- [CFRG] Re: Where should test vectors live? Björn Haase
- [CFRG] Re: Where should test vectors live? Carsten Bormann
- [CFRG] Re: Where should test vectors live? Peter Gutmann
- [CFRG] Re: Where should test vectors live? Frank Denis
- [CFRG] Re: Where should test vectors live? Frank Denis
- [CFRG] Re: Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? Sofia Celi
- [CFRG] Re: Where should test vectors live? Colin Perkins
- [CFRG] Re: Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? Carsten Bormann
- [CFRG] Re: Where should test vectors live? // Sug… Björn Haase
- [CFRG] Re: Where should test vectors live? Colin Perkins
- [CFRG] Re: Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? Salz, Rich
- [CFRG] Re: Where should test vectors live? Jean Mahoney
- [CFRG] Re: Where should test vectors live? Christopher Patton
- [CFRG] Re: Where should test vectors live? John Mattsson
- [CFRG] Re: Where should test vectors live? Peter Gutmann
- [CFRG] Re: Where should test vectors live? Björn Haase
- [CFRG] Re: Where should test vectors live? D. J. Bernstein
- [CFRG] Re: Where should test vectors live? Bellebaum, Thomas
- [CFRG] Re: Where should test vectors live? Scott Fluhrer (sfluhrer)
- [CFRG] Re: Where should test vectors live? Phillip Hallam-Baker