Re: [lamps] New Version Notification for draft-massimo-lamps-pq-sig-certificates-00.txt
Russ Housley <housley@vigilsec.com> Mon, 11 July 2022 20:13 UTC
Return-Path: <housley@vigilsec.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 B8CC9C184B33 for <spasm@ietfa.amsl.com>; Mon, 11 Jul 2022 13:13:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=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=ham autolearn_force=no
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 yxh3U_YeilLv for <spasm@ietfa.amsl.com>; Mon, 11 Jul 2022 13:13:11 -0700 (PDT)
Received: from mail3.g24.pair.com (mail3.g24.pair.com [66.39.134.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 16B6EC16ECF4 for <spasm@ietf.org>; Mon, 11 Jul 2022 13:13:11 -0700 (PDT)
Received: from mail3.g24.pair.com (localhost [127.0.0.1]) by mail3.g24.pair.com (Postfix) with ESMTP id 9F053C41A3; Mon, 11 Jul 2022 16:13:09 -0400 (EDT)
Received: from [10.0.1.2] (pfs.iad.rg.net [198.180.150.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail3.g24.pair.com (Postfix) with ESMTPSA id 85620C4326; Mon, 11 Jul 2022 16:13:09 -0400 (EDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
From: Russ Housley <housley@vigilsec.com>
In-Reply-To: <DM6PR11MB2585E20AE659FB328C6D13FAEA879@DM6PR11MB2585.namprd11.prod.outlook.com>
Date: Mon, 11 Jul 2022 16:13:09 -0400
Cc: "spasm@ietf.org" <spasm@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <6B34C5E9-744E-4304-83CF-D906E41027A6@vigilsec.com>
References: <DM6PR11MB2585CB30B5A19BDB39400B95EA879@DM6PR11MB2585.namprd11.prod.outlook.com> <00AF3B52-729F-4E14-B69D-83E4D4B35863@ll.mit.edu> <DM6PR11MB2585E20AE659FB328C6D13FAEA879@DM6PR11MB2585.namprd11.prod.outlook.com>
To: John Gray <John.Gray@entrust.com>, Uri Blumenthal <uri@ll.mit.edu>, "Massimo, Jake" <jakemas@amazon.com>
X-Mailer: Apple Mail (2.3445.104.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/XNNlNoORhgwtUJ9Q2LGf4unvfTE>
Subject: Re: [lamps] New Version Notification for draft-massimo-lamps-pq-sig-certificates-00.txt
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: Mon, 11 Jul 2022 20:13:14 -0000
John and Uri and Jake:
RFC 5280 does carry the subject public key in a BIT STRING, but that does not mean that each element of the DilithiumPrivateKey SEQUENCE needs to be a BIT STRING. Quite the opposite. Please use the most natural structure, and then tell how to encode that structure into a BIT STRING. Please take a look at RFC 8017 to see how this was done for RSAPublicKey. I would hope that DilithiumPrivateKey can be done in a manner that has no parameters, even if that means that there are several different OIDs that need to be assigned.
Russ
> On Jul 11, 2022, at 9:06 AM, John Gray <John.Gray=40entrust.com@dmarc.ietf.org> wrote:
>
> 5280 says that the subjectPublicKey has to be a BIT STRING, so even if we don't like it I don't think we can change the fact that the subjectPublicKey will eventually be held in a BIT STRING. So wrapping the subjectPublicKey material in OCTET STRING before the final BIT STRING is just an extra layer of wrapping is it not? I was just wondering if there is a technical reason for having that extra layer?
>
> SubjectPublicKeyInfo ::= SEQUENCE {
> algorithm AlgorithmIdentifier,
> subjectPublicKey BIT STRING }
>
> I have created Dilithium certificates both ways and both work equally well (encoded the subjectPublicKey BIT STRING with the DilithiumKey encoded as an OCTET STRING), and the DilithiumKey encoded as a BIT STRING. The second way saves a few bytes is all, but there are no issues I can see other than causing incompatibility between different parsers if one only works with one format or the other.
>
> I notice that the PrivateKeyInfo uses OCTET STRING for its key encoding, which is different than the public key. I would have expected them to be the same, but I guess that is part of history why that happened... ☹
>
> PrivateKeyInfo ::= SEQUENCE {
> version Version,
> privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
> privateKey PrivateKey,
> attributes [0] IMPLICIT Attributes OPTIONAL }
>
> Version ::= INTEGER
>
> PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
>
> PrivateKey ::= OCTET STRING
>
>
> Cheers,
>
> John Gray
>
>
> -----Original Message-----
> From: Blumenthal, Uri - 0553 - MITLL <uri@ll.mit.edu>
> Sent: Sunday, July 10, 2022 8:33 PM
> To: John Gray <John.Gray@entrust.com>
> Cc: Massimo, Jake <jakemas@amazon.com>; spasm@ietf.org
> Subject: [EXTERNAL] Re: [lamps] New Version Notification for draft-massimo-lamps-pq-sig-certificates-00.txt
>
> WARNING: This email originated outside of Entrust.
> DO NOT CLICK links or attachments unless you trust the sender and know the content is safe.
>
> ______________________________________________________________________
> I am strongly against wrapping keys into BIT STRING.
>
> This is a relict from the past, originally caused by insufficient experience, and a relict that proved itself useless.
>
> Stick with OCTET STRING.
>
> Regards,
> Uri
>
>> On Jul 10, 2022, at 20:19, John Gray <John.Gray=40entrust.com@dmarc.ietf.org> wrote:
>>
>> Thank you for posting this draft. It looks very well formed, almost as if you were just waiting for an announcement to be made... 😊
>>
>> I am glad to see there are no algorithm parameters. We have already been doing experiments with Dilithium certificates based on the round 3 candidates, and had to pick our own OIDs (due to lack of standard) and chose NOT to use parameters because we didn't know if there would be any. So it looks like there won't be a lot of changes required to our early non-standard prototype implementations. 😊
>>
>> That being said, I have a couple of comments:
>>
>> In regards to wrapping the public key in an OCTET_STRING:
>>
>> The Dilithium public key MUST be encoded using the ASN.1 type
>> DilithiumPublicKey:
>>
>> DilithiumPublicKey ::= OCTET STRING
>>
>> In testing interop with other implementations (openSSL with open quantum safe for example), I noticed they DO NOT wrap the DilithiumPublicKey in an OCTET_STRING. We did that in our initial implementation, but after going through RFC 5280 again, I don't see a specific need to first wrap the DilithiumKey (or in fact any of the other Post Quantum Signature types such as SPHINCS+ or Falcon) in an OCTET_STRING as that OCTET_STRING then gets wrapped into a BIT STRING as per the SubjectPublicKeyInfo. You actually save 4 bytes without the wrapping.... In any case our current implementation can handle both ways, but it was something I came across and thought I would ask if there was a specific reason why it needed to be wrapped in an OCTET_STRING?
>>
>> This question underlies why we definitely need a standard... 😊
>>
>>
>> In regards to the Private Key format, I notice you have placed an option to contain the PublicKey inside the private key.
>>
>> 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
>> }
>>
>> Is this to align with other private key formats like RFC 5915 (Elliptic Curve Private Key)? With the larger size of these Dilithium keys (and other Post Quantum Keys), I think there would be less appetite for including the public key inside the private key. If an implementation depends on the public key being there, and it is not there, then I guess it would fail, possibly causing interop issues (I have already come across this with the openSSL - libOQS library as they concatenated the public key in the private key, and our implementation did not). So I guess with it being optional are you saying implementations MUST accept the key in either format (with the public key included or with no public key included)?
>>
>>
>> In section 5, you have this sentence:
>>
>> Dilithium public keys are
>> optionally distributed in the publicKey field of the PrivateKeyInfo
>> structure.
>>
>> I think you mean:
>>
>> Dilithium public keys are
>> optionally distributed in the publicKey field of the DilithiumPrivateKey
>> structure.
>>
>>
>> The PrivateKeyInfo structure from RFC 5208 does not contain a public key structure:
>>
>> PrivateKeyInfo ::= SEQUENCE {
>> version Version,
>> privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
>> privateKey PrivateKey,
>> attributes [0] IMPLICIT Attributes OPTIONAL }
>>
>>
>> Thanks again for putting this draft out so quickly after the NIST announcement!
>>
>> Cheers,
>>
>> John Gray
>> Entrust
>>
>> -----Original Message-----
>> From: Spasm <spasm-bounces@ietf.org> On Behalf Of Massimo, Jake
>> Sent: Friday, July 8, 2022 4:08 PM
>> To: spasm@ietf.org
>> Subject: [EXTERNAL] [lamps] FW: New Version Notification for draft-massimo-lamps-pq-sig-certificates-00.txt
>>
>> WARNING: This email originated outside of Entrust.
>> DO NOT CLICK links or attachments unless you trust the sender and know the content is safe.
>>
>> ______________________________________________________________________
>> Hi!
>>
>> I'd like to introduce the 00 draft of the I-D we discussed @ IETF 113 (and we will discuss again @ IETF 114) that will document algorithm identifiers and ASN.1 encoding format for NIST's PQC signature algorithms in X.509. As discussed by Sean Turner in the introduction of the I-D draft-turner-lamps-nist-pqc-kem-certificates, we are splitting up the KEMs from the signature algorithms into separate I-Ds. This is the signature algorithm part. We focus on single PQC algorithm rather than hybrid constructions that are covered in other drafts. We are planning to use the algorithm identifiers assigned by NIST. The draft discusses the signature algorithm Dilithium.
>>
>> If there are any feedback or comments to the draft in advance to the meeting, feel free to contact me.
>>
>> Cheers,
>> Jake
>>
>>
>> On 08/07/2022, 11:37, "internet-drafts@ietf.org" <internet-drafts@ietf.org> wrote:
>>
>> 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.
>>
>>
>>
>> A new version of I-D, draft-massimo-lamps-pq-sig-certificates-00.txt
>> has been successfully submitted by Jake Massimo and posted to the
>> IETF repository.
>>
>> Name: draft-massimo-lamps-pq-sig-certificates
>> Revision: 00
>> Title: Algorithms and Identifiers for Post-Quantum Algorithms
>> Document date: 2022-07-08
>> Group: Individual Submission
>> Pages: 12
>> URL: https://urldefense.com/v3/__https://www.ietf.org/archive/id/draft-massimo-lamps-pq-sig-certificates-00.txt__;!!FJ-Y8qCqXTj2!em5Q_A_k1PMQ0W4omwWUauCCeb4EMshOz6mYYWzWzuQkN7W39uZc2n6qACvqm-IoJWr8lOb4JA7PFy5EbwwaOZJYPgTgSdndyJ0lmSg$
>> Status: https://urldefense.com/v3/__https://datatracker.ietf.org/doc/draft-massimo-lamps-pq-sig-certificates/__;!!FJ-Y8qCqXTj2!em5Q_A_k1PMQ0W4omwWUauCCeb4EMshOz6mYYWzWzuQkN7W39uZc2n6qACvqm-IoJWr8lOb4JA7PFy5EbwwaOZJYPgTgSdnd2kZG978$
>> Html: https://urldefense.com/v3/__https://www.ietf.org/archive/id/draft-massimo-lamps-pq-sig-certificates-00.html__;!!FJ-Y8qCqXTj2!em5Q_A_k1PMQ0W4omwWUauCCeb4EMshOz6mYYWzWzuQkN7W39uZc2n6qACvqm-IoJWr8lOb4JA7PFy5EbwwaOZJYPgTgSdnd7ZiJyGA$
>> Htmlized: https://urldefense.com/v3/__https://datatracker.ietf.org/doc/html/draft-massimo-lamps-pq-sig-certificates__;!!FJ-Y8qCqXTj2!em5Q_A_k1PMQ0W4omwWUauCCeb4EMshOz6mYYWzWzuQkN7W39uZc2n6qACvqm-IoJWr8lOb4JA7PFy5EbwwaOZJYPgTgSdnd7k9nM9I$
>>
>>
>> Abstract:
>> Digital signatures are used within X.509 certificates, Certificate
>> Revocation Lists (CRLs), and to sign messages. This document
>> describes the conventions for using Dilithium quantum-resistant
>> signatures in Internet X.509 certificates and certifiate revocation
>> lists. The conventions for the associated post-quantum signatures,
>> subject public keys, and private key are also described.
>>
>>
>>
>>
>> The IETF Secretariat
>>
>>
>>
>> _______________________________________________
>> Spasm mailing list
>> Spasm@ietf.org
>> https://urldefense.com/v3/__https://www.ietf.org/mailman/listinfo/spasm__;!!FJ-Y8qCqXTj2!em5Q_A_k1PMQ0W4omwWUauCCeb4EMshOz6mYYWzWzuQkN7W39uZc2n6qACvqm-IoJWr8lOb4JA7PFy5EbwwaOZJYPgTgSdnd2gf0i_M$
>> 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.
>> _______________________________________________
>> Spasm mailing list
>> Spasm@ietf.org
>> https://www.ietf.org/mailman/listinfo/spasm
> _______________________________________________
> Spasm mailing list
> Spasm@ietf.org
> https://www.ietf.org/mailman/listinfo/spasm
- [lamps] FW: New Version Notification for draft-ma… Massimo, Jake
- Re: [lamps] FW: New Version Notification for draf… Russ Housley
- Re: [lamps] FW: New Version Notification for draf… Ilari Liusvaara
- Re: [lamps] New Version Notification for draft-ma… John Gray
- Re: [lamps] New Version Notification for draft-ma… Blumenthal, Uri - 0553 - MITLL
- Re: [lamps] New Version Notification for draft-ma… John Gray
- Re: [lamps] New Version Notification for draft-ma… Blumenthal, Uri - 0553 - MITLL
- Re: [lamps] New Version Notification for draft-ma… Russ Housley
- Re: [lamps] [EXTERNAL] Re: New Version Notificati… John Gray
- Re: [lamps] [EXTERNAL] Re: New Version Notificati… Blumenthal, Uri - 0553 - MITLL
- Re: [lamps] New Version Notification for draft-ma… Russ Housley
- Re: [lamps] New Version Notification for draft-ma… Corey Bonnell
- Re: [lamps] New Version Notification for draft-ma… Massimo, Jake