Re: [lamps] [EXTERNAL] Re: [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.

Mike Ounsworth <Mike.Ounsworth@entrust.com> Thu, 29 September 2022 13:26 UTC

Return-Path: <Mike.Ounsworth@entrust.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 58044C1522C9; Thu, 29 Sep 2022 06:26:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.706
X-Spam-Level:
X-Spam-Status: No, score=-2.706 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_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_LOW=-0.7, 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] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=entrust.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 Gq6dBFHRu8WB; Thu, 29 Sep 2022 06:26:42 -0700 (PDT)
Received: from mx07-0015a003.pphosted.com (mx07-0015a003.pphosted.com [185.132.183.227]) (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 8EDBAC1524C9; Thu, 29 Sep 2022 06:26:41 -0700 (PDT)
Received: from pps.filterd (m0242864.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28T6i9sJ025402; Thu, 29 Sep 2022 08:26:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=entrust.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=mail1; bh=P3oe5rd0lv8wGq20/aimQH3Z/kIiGlwOs8+0MAjpUbo=; b=IF3EnQs2Dr6ahHkEIGz24c6FoXHAv8R+eJfVySbmaxiYhDKvxeVWlRHC0RgVDvRX8mAP UNQE2C5/HcRlMprQQQNxCLs08QBohVPccC7Mls8XS7+jJmo3RubBrOmfGBO8n0oG94s3 oO4RYMCs55uJ8Fqmng2o5XQhYnFWWhQjrEDujleVVwLyj9OwxGimNAqQSOK+XurQ2Iki gDTywMuSRoQ6l1PCS7dRjsJUcPDcliUKEncXRTJrAwz0FWL+gB1IMTaHK5QVPWGyjRQn 8rttmcJsyry3IwHH8phJl1Qt2h7gedtu/L0UgdxlNdQY4btHbmiaWG4eNprbVSa3g6qj Og==
Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 3jsxk451fb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Sep 2022 08:26:29 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Obenu8dS4Q2iD+FoVBfjON4XAQBfrkIs8FbGMvR8lbEToi+LH5I5+Z8ACiH1H115gUPaYdLMB6u7zKpk921xd4kK/OB1rxL5kyah0YNNGB3MBo51XDzDY+27T08ixSLGPsqbMEgNhI7s/SlYll/pByEycGfLdvt5xTu+oq1nT7QILafr6bdt/aYgwEj5OMXi3p99U31mMdV7qHRkvh/zX74/h/0pfU2zlYS/4hMqCOrYpK7APY2R96oanWGKSY7C5L5UKq7Ep/9dHhSL0UFtFCfBdc7eer1uX0HSPWR5i7FySNmntMwgMjOhA+Tn40l+1NZ1nQpr1gq5jmEiJiKCqQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=P3oe5rd0lv8wGq20/aimQH3Z/kIiGlwOs8+0MAjpUbo=; b=FTIyY6kPyzgEsBH6WMsmeYIdFB+SlTv2sy3l4L8DBZjalD9tQkdpMzNPlih+5XapsbqO11QpA22dLko+pUgs5Q302D4Z9xcSEZR4CEBPtwzd5r+yaCwuGGUa/n0O2qtP3+9QHbEWp3S57PIvoiwgv9WGhomi+hOObGGo8CIK4k59HLzNS5rZlsQunjWqSB+jn6NgvymnUW+g3O9zudunYITD/kUqc2E3+J4deRR/9uMY8OBwPYnBxGRyo4N8DB8iL9svv05w1duR82iNR/Sn8vGTPHDI/lVjJRp7y7OyoVyA0qA8TRSC4nL7+YVsebVrLGSDS0uUxqfI/+VXYAQRQg==
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 PH8PR11MB6803.namprd11.prod.outlook.com (2603:10b6:510:1cb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Thu, 29 Sep 2022 13:26:26 +0000
Received: from CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::9d8e:5cd6:89b8:244c]) by CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::9d8e:5cd6:89b8:244c%2]) with mapi id 15.20.5654.025; Thu, 29 Sep 2022 13:26:26 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: Christine Cloostermans <cvvrede@gmail.com>
CC: Bas Westerbaan <bas@westerbaan.name>, "Massimo, Jake" <jakemas@amazon.com>, John Gray <John.Gray=40entrust.com@dmarc.ietf.org>, "pqc@ietf.org" <pqc@ietf.org>, "spasm@ietf.org" <spasm@ietf.org>, "cfrg@ietf.org" <cfrg@ietf.org>, "Panos Kampanakis (pkampana)" <pkampana@cisco.com>, Sean Turner <sean@sn3rd.com>, "sid@zurich.ibm.com" <sid@zurich.ibm.com>, "bhe@zurich.ibm.com" <bhe@zurich.ibm.com>, "tvi@zurich.ibm.com" <tvi@zurich.ibm.com>, "osb@zurich.ibm.com" <osb@zurich.ibm.com>, "dieter.bong@utimaco.com" <dieter.bong@utimaco.com>, "joppe.bos@nxp.com" <joppe.bos@nxp.com>, "Markku-Juhani O. Saarinen" <mjos@pqshield.com>
Thread-Topic: [EXTERNAL] Re: [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.
Thread-Index: AQHY034jDBU7sXm8vkigqDJMZH5XRK31XCGAgAABjpCAAMxagIAAPJkQ
Date: Thu, 29 Sep 2022 13:26:26 +0000
Message-ID: <CH0PR11MB5739B2EA9A180EDF503BE0D49F579@CH0PR11MB5739.namprd11.prod.outlook.com>
References: <574516F5-098F-4CB6-8D9C-F193BF1B1507@amazon.com> <2B8DF0B3-B79C-4688-B481-737BCCC9EFF1@westerbaan.name> <CH0PR11MB5739CCCC7C99CC2F194C06719F549@CH0PR11MB5739.namprd11.prod.outlook.com> <CAHzQBQWo9514PeeCatTcOv58muG9LLzihWr1+v9NOuAoPhTysg@mail.gmail.com>
In-Reply-To: <CAHzQBQWo9514PeeCatTcOv58muG9LLzihWr1+v9NOuAoPhTysg@mail.gmail.com>
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_|PH8PR11MB6803:EE_
x-ms-office365-filtering-correlation-id: 7e30951f-9854-42ab-1bb8-08daa21e3605
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 6Xnl7CLT2wdT1Rzr71m9xhDxnTahue4EiJKSMsbFP62i4bgO+qeYk7613TDlkjJN1Ft9wHR5wvdpG/VYn9qu7yFAq/OtWg5MgRG2ZTJs+CDWbsRt/Yb3ZWBBxf0DvlCzDKGip2zBT45CgAoaAyd2Psl4kNTECC0jeze1qKxQiYyYvyXxqfX09JPlYjcrx4AEx5EEwrFz8RYaMG5ltqfSwStmRrxHz4XF16okWSvUfEWvkJW8sRXOAHXpYeKHQ/DFePIxK5ynekXUmL8poveMa23+TdN8+NNDognx/u9Squ2IkjkhdCvY9h3twTsyjozCYOh+fhJfzg41l7hk0WuWg2J3w+BgXKL4Z1AVxTtgpHp5tj4wJXGqVhwszBGSNSft8fo2V/asFTwqiPr6b1Lh9O0Obdc2DDswt6pFAsCPH8URgQ+opmi+EoORkP/VqDpK+j3uLH18IhO7OI909GgHDC8N0pFdvkHvfjC3d7xH3srPn8lK2FX2ekoIXfVBh8FxpMkSCWF/xYze7LfNqYA9CH01FYUAsnADpn1iqThRnuunf0tgwDJ8WDlEO+Wu+U5nOHNJ8tCeApwk43ARHomJrkTPCN/Z3Ltt4rlUVepZmKarZqyUvh2Xlk0YOy+yPkwhAvvBnOJ6ssMOy/HzcvI5t01jZNhI3DkPXNlnVWNrpQBU2urGrMjRTZbIKoF2hvfH7Yw3rvjrfHqlxrllz7zfsd88ZlBOawdoM7pIj6JsX8ThBNG0uk7FOPqrpf8jFpNcK+AcVmwrobnQTF5ooJsI05yHy0falNKljOIO5Mc1ysa190HTQDonTDSkudPfqmbKsrMwvrcz6BkzHfcwdxtIzA==
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:(13230022)(376002)(366004)(136003)(39860400002)(346002)(396003)(451199015)(66946007)(66556008)(6916009)(76116006)(64756008)(8676002)(41300700001)(4326008)(66446008)(66476007)(316002)(54906003)(8936002)(71200400001)(52536014)(966005)(166002)(33656002)(53546011)(9686003)(26005)(2906002)(86362001)(38100700002)(55016003)(478600001)(186003)(7416002)(5660300002)(6506007)(7696005)(83380400001)(38070700005)(122000001)(579004); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: KRsQInglAGZN5hGiYp4vWsFaIYyTAoYJ+gVxi7Za4XP6tuHMZbJJb7Yk6lgFoycoVns5xKxW9CeRWn1yUHzw9yrvS19SXabpXty313KO8UQKCcVicJANvQjPUZN6GXMtscINppYMf9DSN9jbDV1pMCiQ1y09iECmys1aCu6NHVDz7ZAyeOV5xFqkcM+puDeYgHmJpCehqerKE5cZyUw/LtSyxf6pg6xgsUElGoazDhBJYKL7H1ICStoSGF7t8a3SLuemRI88HqDrZ2ULU/L/Yf/dX6eVIPOnIR21TbXgVvk2LAezd+50wm6nPqHSv/fC26SeeJ+QWuDdKZFtAQDlV7gW2xrKN8HQTpRA/txUOKrGbYLFtaPt3dIM7d3c2IfqNzdBgwB4P0jdLBmEbMPD6Fx/eei/vh1dSVDH1vNGBIdiAPvzpI43h1dmroOcx+0F9uAAwaAMxwIFqGhUpcJz/qOS0lmbfDr1w0qfecrPsPxj0w5B08GvsZh85ZHe8+FRa9uVra/zCtxJX3LL10q00MqdL1zcSx1w45319psQLJxYGlzxjTpt0VoQiDzrLyIYj8ov7Hn/PMBsjC5VOx2y9ZNivg3yeV2/ug9DFPX0BeDaPqocRj+rVl1r/jsTy1b6pBn9Wg8Hfezlnd8ITJ+3tOl4q3Hx1tuRjcbgs4BPNxOadFWjDlaZiZTyY+806nf3bWK8d/Kt0uw3zRGUrGVwcKX5xqMF3dmAYqyFpSTYLBkoACSQvu4oP7JLBrCEHDwC6i3vHqt8PA90VibI1QpZ/Rh520ZcDqCt4N0FYL62j1dHpYeARYnTKsoXcOuLsIg7IwfMCD+ZqmC+8KLPRaeu1ETrtQPrMwYrHa7NOTYbr7d3G/wUAUOXtQyMO8XCiH2gJaaj0q39zIpe2UqcNzLVjCBqgX7vxfn819FMaA7wlrY19KT7v+C2Am/Re4ieOHqqwhIMWZm6cosaVLb6YlOlqdETOs6XXYRr0b4FQ1f+F+BwfEuBA/FsNU+oYdhleDD3K/AC35O8hYJGHd8l7TQODhHpWOuhxIIZpZ+q4LXKa4s0TI6zPcN9w/qKd4xD+NWKZT7zGZ7YBITTCyvzED2jonh3wzBxoEjkM2HuVZ0xb9g4MgYtHBkqEWuMduh0TjNy9EA7NjYP7teV3xNYIbs94L2+ELh2FDi1TzMQSw3rrUzVccP6KVKbrQHdehzKt9erD0PwoN+haj4kCkuzSc+u5Hh4D7sM6vBbkRC/JNgUCTUaapXCvvXQKZRDs+CcNm8AxyM+WGUlmLKeUHhX3e9FGCYQjIPzNiI1J9Q99ohj+DDywgSZdAfXHnFHEXoNkVRvw2WftbLOMHP+LoAlx3y3Zq7h+N5kvVfuD4HUPbkoKr+oA5nHuATH0Ik1d95cjfeddyRzWSExpM1kCdekjpac37CRkbAp+CpTDls+/oo6VTkBRxxNMZBLb97Ljxgojb6nVEIiG8fVCpo+q9OeEC1baCi56cQtrpsVvjw7PVOLTmrJU35DslrPyDkYZk374R2MmkU8hc0QHM4G1bcb3p7qHtYMd/e/HlSVmDBE4Gb0OcyQ3Wian9RiextkZlSQoJWS
Content-Type: multipart/alternative; boundary="_000_CH0PR11MB5739B2EA9A180EDF503BE0D49F579CH0PR11MB5739namp_"
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: 7e30951f-9854-42ab-1bb8-08daa21e3605
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2022 13:26:26.4744 (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: QrXQ5MO0fAMp3kxoi9xW9LcGOENqVRW+8ZHXe7eP1bvFZpOfUd21HF5D32IT9FDFwvBWeAqbjngw2+rb8ljRPSIjh4vdJSRI0n3hejMRzas=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6803
X-Proofpoint-ORIG-GUID: EYv6NCNbYckMDLkSfKsPkRlmEFpHS1_5
X-Proofpoint-GUID: EYv6NCNbYckMDLkSfKsPkRlmEFpHS1_5
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-29_07,2022-09-29_03,2022-06-22_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 phishscore=0 adultscore=0 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1011 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209290083
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/vHgfEE3VUusHLkfimby9Rp0uOwI>
X-Mailman-Approved-At: Thu, 29 Sep 2022 06:51:29 -0700
Subject: Re: [lamps] [EXTERNAL] Re: [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Sep 2022 13:26:46 -0000

Thanks Christine! Valuable work, and good to see you still active in this space!

Last question from me: which working group are you doing this through? I just want to make sure I don’t miss updates and discussion!

---
Mike Ounsworth

From: Christine Cloostermans <cvvrede@gmail.com>
Sent: September 29, 2022 4:48 AM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com>
Cc: Bas Westerbaan <bas@westerbaan.name>; Massimo, Jake <jakemas@amazon.com>; John Gray <John.Gray=40entrust.com@dmarc.ietf.org>; pqc@ietf.org; spasm@ietf.org; cfrg@ietf.org; Panos Kampanakis (pkampana) <pkampana@cisco.com>; Sean Turner <sean@sn3rd.com>; sid@zurich.ibm.com; bhe@zurich.ibm.com; tvi@zurich.ibm.com; osb@zurich.ibm.com; dieter.bong@utimaco.com; joppe.bos@nxp.com; Markku-Juhani O. Saarinen <mjos@pqshield.com>
Subject: Re: [EXTERNAL] Re: [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.

Hi,

Fielding a couple of the questions at once:

- The plan is to publish it as an RFC. At the last IETF meeting it was decided it would make sense to split it into multiple RFCs (one per winner). We are working on the split.
- The split includes a Sphincs+ document. Initially we considered only the finalists, but now also added Sphincs+ as it is now a winner.
- Splitting between a seed and the full key is intesting. This might be a problem to be fielded in LMS/XMSS as well. Different OIDs seems like it would become a long list, but I am not sure whether that is a problem.

Cheers,

Christine

Op wo 28 sep. 2022 om 23:39 schreef Mike Ounsworth <Mike.Ounsworth@entrust.com<mailto:Mike.Ounsworth@entrust.com>>:
> So I’d propose as format either storing the opaque private key (as specified by the CRYSTALS team) or the seed.

I like the idea. What’s the easiest way for a parser trying to read this off disk to know the difference between:

   dilithiumPrivateKey OCTET STRING
and
    dilithiumPrivateKeySeed OCTET STRING
?

Different PrivateKeyAlgorithmIdentifier OIDs?

---
Mike Ounsworth
Software Security Architect, Entrust

From: Bas Westerbaan <bas@westerbaan.name<mailto:bas@westerbaan.name>>
Sent: September 28, 2022 4:31 PM
To: Massimo, Jake <jakemas@amazon.com<mailto:jakemas@amazon.com>>
Cc: Mike Ounsworth <Mike.Ounsworth@entrust.com<mailto:Mike.Ounsworth@entrust.com>>; John Gray <John.Gray=40entrust.com@dmarc.ietf.org<mailto:40entrust.com@dmarc.ietf.org>>; pqc@ietf.org<mailto:pqc@ietf.org>; spasm@ietf.org<mailto:spasm@ietf.org>; cfrg@ietf.org<mailto:cfrg@ietf.org>; Panos Kampanakis (pkampana) <pkampana@cisco.com<mailto:pkampana@cisco.com>>; Sean Turner <sean@sn3rd.com<mailto:sean@sn3rd.com>>; cvvrede@gmail.com<mailto:cvvrede@gmail.com>; sid@zurich.ibm.com<mailto:sid@zurich.ibm.com>; bhe@zurich.ibm.com<mailto:bhe@zurich.ibm.com>; tvi@zurich.ibm.com<mailto:tvi@zurich.ibm.com>; osb@zurich.ibm.com<mailto:osb@zurich.ibm.com>; dieter.bong@utimaco.com<mailto:dieter.bong@utimaco.com>; joppe.bos@nxp.com<mailto:joppe.bos@nxp.com>; Markku-Juhani O. Saarinen <mjos@pqshield.com<mailto:mjos@pqshield.com>>
Subject: [EXTERNAL] Re: [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.

WARNING: This email originated outside of Entrust.
DO NOT CLICK links or attachments unless you trust the sender and know the content is safe.
________________________________
     DilithiumPrivateKey ::= SEQUENCE {
         version                               Version,
         privateKeyAlgorithm      PrivateKeyAlgorithmIdentifier,
         privateKey                        OCTET STRING,
         publicKey                            [0] IMPLICIT DilithiumPublicKey OPTIONAL
     }

PQC private keys are typically rather large and, for many schemes can be generated cheaply from a small seed (such as with Dilithium). That’s helpful if you store many private keys or are rather constrained in storage.

So I’d propose as format either storing the opaque private key (as specified by the CRYSTALS team) or the seed.

Best,

 Bas






i.e., the parameters are defined/contained within privateKeyAlgorithm. This means we can support the byte array encoding for the private key proposed by the algorithm designers in privateKey an OCTET STRING.

Thoughts?

Cheers,
Jake

From: Mike Ounsworth <Mike.Ounsworth@entrust.com<mailto:Mike.Ounsworth@entrust.com>>
Date: Wednesday, 28 September 2022 at 13:26
To: John Gray <John.Gray=40entrust.com@dmarc.ietf.org<mailto:John.Gray=40entrust.com@dmarc.ietf.org>>, "pqc@ietf.org<mailto:pqc@ietf.org>" <pqc@ietf.org<mailto:pqc@ietf.org>>, "spasm@ietf.org<mailto:spasm@ietf.org>" <spasm@ietf.org<mailto:spasm@ietf.org>>, "cfrg@ietf.org<mailto:cfrg@ietf.org>" <cfrg@ietf.org<mailto:cfrg@ietf.org>>
Cc: "Massimo, Jake" <jakemas@amazon.com<mailto:jakemas@amazon.com>>, "Panos Kampanakis (pkampana)" <pkampana@cisco.com<mailto:pkampana@cisco.com>>, Sean Turner <sean@sn3rd.com<mailto:sean@sn3rd.com>>, "bas@westerbaan.name<mailto:bas@westerbaan.name>" <bas@westerbaan.name<mailto:bas@westerbaan.name>>, "cvvrede@gmail.com<mailto:cvvrede@gmail.com>" <cvvrede@gmail.com<mailto:cvvrede@gmail.com>>, "sid@zurich.ibm.com<mailto:sid@zurich.ibm.com>" <sid@zurich.ibm.com<mailto:sid@zurich.ibm.com>>, "bhe@zurich.ibm.com<mailto:bhe@zurich.ibm.com>" <bhe@zurich.ibm.com<mailto:bhe@zurich.ibm.com>>, "tvi@zurich.ibm.com<mailto:tvi@zurich.ibm.com>" <tvi@zurich.ibm.com<mailto:tvi@zurich.ibm.com>>, "osb@zurich.ibm.com<mailto:osb@zurich.ibm.com>" <osb@zurich.ibm.com<mailto:osb@zurich.ibm.com>>, "dieter.bong@utimaco.com<mailto:dieter.bong@utimaco.com>" <dieter.bong@utimaco.com<mailto:dieter.bong@utimaco.com>>, "joppe.bos@nxp.com<mailto:joppe.bos@nxp.com>" <joppe.bos@nxp.com<mailto:joppe.bos@nxp.com>>
Subject: RE: [EXTERNAL][Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.


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.

My curiosity is about the procedural aspect of draft-uni-qsckeys. Is this attached to a working group? Are you indenting to publishing this as an RFC, or is this just to bridge prototyping work until NIST publishes real standards?

---
Mike Ounsworth
Software Security Architect, Entrust

From: Pqc <pqc-bounces@ietf.org<mailto:pqc-bounces@ietf.org>> On Behalf Of John Gray
Sent: September 28, 2022 1:34 PM
To: pqc@ietf.org<mailto:pqc@ietf.org>; spasm@ietf.org<mailto:spasm@ietf.org>; cfrg@ietf.org<mailto:cfrg@ietf.org>
Cc: Massimo, Jake <jakemas@amazon.com<mailto:jakemas@amazon.com>>; Panos Kampanakis (pkampana) <pkampana@cisco.com<mailto:pkampana@cisco.com>>; Sean Turner <sean@sn3rd.com<mailto:sean@sn3rd.com>>; bas@westerbaan.name<mailto:bas@westerbaan.name>; cvvrede@gmail.com<mailto:cvvrede@gmail.com>; sid@zurich.ibm.com<mailto:sid@zurich.ibm.com>; bhe@zurich.ibm.com<mailto:bhe@zurich.ibm.com>; tvi@zurich.ibm.com<mailto:tvi@zurich.ibm.com>; osb@zurich.ibm.com<mailto:osb@zurich.ibm.com>; dieter.bong@utimaco.com<mailto:dieter.bong@utimaco.com>; joppe.bos@nxp.com<mailto:joppe.bos@nxp.com>
Subject: [EXTERNAL] [Pqc] Multiple drafts with PQ algorithm key encodings that are not compatible.

WARNING: This email originated outside of Entrust.
DO NOT CLICK links or attachments unless you trust the sender and know the content is safe.
________________________________
We are doing some interoperability testing with different vendors using the new Dilithium, Falcon and SPHINCS+ algorithms.   We have come across at least two drafts which are trying to specify the ASN.1 encoding formats for these algorithms.   However, the encoding formats are not compatible with each other.   I imagine the authors of these drafts should get together and come up with a common format (I have copied them on this email).   This means we must choose one or the other, or even worse, support multiple formats (which can lead to bugs).   Initially I started more than a year ago using my own encoding format for internal prototyping, but now need to interoperate with others outside of our organization, so a common format is definitely needed at this point.   😊

We fully realize the OID values will be changing once official OIDs are registered, (changing those are trivial), but the ASN.1 formats of the public and private keys is kind of important as well…  😊

For example:

The LAMPS group has a specification of Dilithium public keys in this draft:
https://datatracker.ietf.org/doc/draft-massimo-lamps-pq-sig-certificates/<https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-massimo-lamps-pq-sig-certificates/__;!!FJ-Y8qCqXTj2!eSTwME-1IjQkfjJFS0X7lRzbYJ1PhEzSelmmUcLwF9JaceAAKFQwvLRif4O6vS8ijYlK0TG2cYO4rpBHtq5AG1OZQAKxlou-rKXm$>


the public key format is this:



The Dilithium public key MUST be encoded using the ASN.1 type

   DilithiumPublicKey:



     DilithiumPublicKey ::= OCTET STRING



The private key format is this:



     DilithiumPrivateKey ::= SEQUENCE {

         rho         BIT STRING,         - nonce/seed

         K           BIT STRING,         - key/seed

         tr          BIT STRING,         - PRF bytes (CRH in spec.)

         s1          BIT STRING,         - vector l

         s2          BIT STRING,         - vector k

         t0          BIT STRING,         - encoded vector

         PublicKey   IMPLICIT DilithiumPublicKey OPTIONAL

     }



In this draft:
https://datatracker.ietf.org/doc/draft-uni-qsckeys/01/<https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-uni-qsckeys/01/__;!!FJ-Y8qCqXTj2!eSTwME-1IjQkfjJFS0X7lRzbYJ1PhEzSelmmUcLwF9JaceAAKFQwvLRif4O6vS8ijYlK0TG2cYO4rpBHtq5AG1OZQAKxlnAfHtmn$>

Dilithium keys have this encoding:




   DilithiumPublicKey ::= SEQUENCE {

       rho         OCTET STRING,

       t1          OCTET STRING

   }





  DilithiumPrivateKey ::= SEQUENCE {

       version     INTEGER {v0(0)}     -- version (round 3)

       nonce       BIT STRING,         -- rho

       key         BIT STRING,         -- key/seed/D

       tr          BIT STRING,         -- PRF bytes (CRH in spec)

       s1          BIT STRING,         -- vector(L)

       s2          BIT STRING,         -- vector(K)

       t0          BIT STRING,

       publicKey  [0] IMPLICIT DilithiumPublicKey OPTIONAL

                                       -- see next section

   }

The draft-uni-qsckeys does not cover SPHINCS+,  it does cover Falcon, but I don’t know of another draft that specifies Falcon.

There are also encodings for Kyber mentioned in two documents that I see.  There is an early   https://datatracker.ietf.org/doc/draft-ietf-lamps-kyber-certificates/<https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-ietf-lamps-kyber-certificates/__;!!FJ-Y8qCqXTj2!eSTwME-1IjQkfjJFS0X7lRzbYJ1PhEzSelmmUcLwF9JaceAAKFQwvLRif4O6vS8ijYlK0TG2cYO4rpBHtq5AG1OZQAKxlubO7POn$>  draft which mentions it is up to the document defining Kyber to give more details.    In the draft-uni-qsckeys draft it is more specific.

https://datatracker.ietf.org/doc/draft-uni-qsckeys/01/<https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-uni-qsckeys/01/__;!!FJ-Y8qCqXTj2!eSTwME-1IjQkfjJFS0X7lRzbYJ1PhEzSelmmUcLwF9JaceAAKFQwvLRif4O6vS8ijYlK0TG2cYO4rpBHtq5AG1OZQAKxlnAfHtmn$>

   KyberPrivateKey ::= SEQUENCE {
       version     INTEGER {v0(0)}   -- version (round 3)
       s           OCTET STRING,     -- sample s
       publicKey   [0] IMPLICIT KyberPublicKey OPTIONAL,
                                     -- see next section
       hpk         OCTET STRING      -- H(pk)
       nonce       OCTET STRING,     -- z
   }

Partial public key encoding:


KyberPrivateKey ::= SEQUENCE {

       version     INTEGER {v0(0)}   -- version (round 3)

       s           OCTET STRING,     -- EMPTY

       publicKey   [0] IMPLICIT KyberPublicKey OPTIONAL,

                                     -- see next section

       hpk         OCTET STRING      -- EMPTY

       nonce       OCTET STRING,     -- d

   }

Full public key encoding:


   KyberPublicKey ::= SEQUENCE {

       t           OCTET STRING,

       rho         OCTET STRING

   }

Is https://datatracker.ietf.org/doc/draft-uni-qsckeys/01/<https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-uni-qsckeys/01/__;!!FJ-Y8qCqXTj2!eSTwME-1IjQkfjJFS0X7lRzbYJ1PhEzSelmmUcLwF9JaceAAKFQwvLRif4O6vS8ijYlK0TG2cYO4rpBHtq5AG1OZQAKxlnAfHtmn$> meant to become the document that defines the key formats for all the PQ keys that will be standardized?    If not, then it should probably just refer to whatever documents will define the formats so that we can at least agree on one common format for the PQ keys.


Cheers,

John Gray
Entrust
Any email and files/attachments transmitted with it are confidential and 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.