Re: [CFRG] Last call for draft-irtf-cfrg-vrf-09

"Kaliski, Burt" <bkaliski@verisign.com> Tue, 09 November 2021 18:27 UTC

Return-Path: <bkaliski@verisign.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 29F6B3A0F49 for <cfrg@ietfa.amsl.com>; Tue, 9 Nov 2021 10:27:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=verisign.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CUa49VLoiTTL for <cfrg@ietfa.amsl.com>; Tue, 9 Nov 2021 10:27:26 -0800 (PST)
Received: from mail4.verisign.com (mail4.verisign.com [69.58.187.30]) (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 94DB83A0F44 for <cfrg@irtf.org>; Tue, 9 Nov 2021 10:27:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verisign.com; l=36920; q=dns/txt; s=VRSN; t=1636482447; h=from:to:subject:date:message-id:mime-version; bh=CnPjLlUGXhrEqnaAW6kAqCCUH3ruMrFL3EpTqH8zekU=; b=rFM/QwCuG4s65iGd++1BIpO35JojEzHhR2xM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uvzuVk5pd3dJfwlSJTCWKbLzcFVxjYrh89IW/3ZY qL1bBI2NUyQPEIXYj/7DroPgv6vin7AYgZjg02bp5gNpHTr7Vxuhe2F3N39P4biqd9utk2Wv G3u/n7lDFcdLtP39Nae2nOoibbQmy7rANhXD6OisPtrmxiZwSoSDBJPE0Whuv//gUm7Mz5CF 3EpFuMVhfBa3CSWohPVBnVUfFbsUsYgZudt
IronPort-HdrOrdr: A9a23:jKrho6H8LnDUDxZwpLqENceALOsnbusQ8zAXPidKOHlom62j5q KTdZsgtSMc5Ax+ZJhCo7+90cC7KBvhHPVOkOos1NmZPTXOiS+HIIZv9oP+zzClMD2WzIJg/J YlV6RlEtX/ARxZgdaS2mOFOudl5NWc6qiniaPl0nF3QWhRBp1I9QtjFQqBKEFwSTRHAZZRLv Gh2vY=
X-IronPort-AV: E=Sophos; i="5.87,220,1631592000"; d="scan'208,217"; a="11087700"
Received: from ILG1WNEX01.vcorp.ad.vrsn.com (10.246.152.25) by ILG1WNEX02.vcorp.ad.vrsn.com (10.246.152.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Tue, 9 Nov 2021 13:27:24 -0500
Received: from ILG1WNEX01.vcorp.ad.vrsn.com ([fe80::8c53:d345:af76:52e8]) by ILG1WNEX01.vcorp.ad.vrsn.com ([fe80::8c53:d345:af76:52e8%5]) with mapi id 15.01.2308.015; Tue, 9 Nov 2021 13:27:24 -0500
From: "Kaliski, Burt" <bkaliski@verisign.com>
To: "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: [CFRG] Last call for draft-irtf-cfrg-vrf-09
Thread-Index: AdfVlpxN2DNUpm0tR/KARqeYvLc6cg==
Date: Tue, 09 Nov 2021 18:27:24 +0000
Message-ID: <f027620eee0148e5888a0f39b0434aaf@verisign.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.170.148.18]
Content-Type: multipart/alternative; boundary="_000_f027620eee0148e5888a0f39b0434aafverisigncom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/77oO-5rMCCi8r8UF8a4IGmSrrSE>
Subject: Re: [CFRG] Last call for draft-irtf-cfrg-vrf-09
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Nov 2021 18:27:32 -0000

CFRG,



Following are some additional comments on draft-irtf-cfrg-vrf-09.



In general, the draft is well written and is effective in translating research concepts into an implementable specification.  The reuse of related techniques is helpful for interoperability.



The changes I suggest below are intended to clarify the specification, explain how certain error conditions are handled, and provide additional rationale for design choices.  None of the changes would affect the values computed by the VRFs.



I have not checked the test vectors.



I think the draft is ready for publication as an RFC once the comments already submitted in response to the last call are addressed, and modulo the comments offered here.



Thanks for the opportunity to review.  -- Burt



Technical Comments



T1. General: The specification frequently computes one-octet constants as an explicit algorithm step, e.g., "one_string = 0x01 = I2OSP(1, 1), a single octet with value 1".  Suggest defining the notation "0x" as in [RFC8017] and then using constants such as 0x01 directly in the algorithms rather than computing them, to avoid the superfluous steps. (The ECVRF algorithms use int_to_string which is suite-specific, but the single-octet output is the same for all suites.)



T2. Sec. 4, "Parameters used:" / "K - RSA private key": Suggest to add note that representation of K is implementation-dependent



T3. Sec. 4.3, step 2: Suggest adding error handling for the case that s >= n, in which case RSAVP1 will return "signature representative out of range" and the algorithm should output "INVALID"



T4. Sec. 4.3, step 3: Suggest adding error handling for the case that m >= 2^(8(k-1)), in which case I2OSP will return "integer too large" and the algorithm should output "INVALID".  Alternatively, instead of computing EM from m and comparing EM to EM', compute m' from EM' (as m' = OS2IP(EM')) and compare m to m'



T5. Sec. 5, "Fixed options" / "2n": Suggest adding an explanation why n is introduced this way. Based on the security analysis in [PWHVNRG17], n appears to correspond to the security level $\ell$, as both are the lengths of the challenge c (in octets vs. bits). It's not clear why the parameter n is defined here in terms of the length of a field element, rather than the size of group G. Although the security level is affected by the size of the field, it is not necessarily related to the length in octets of a field element (if this is understood to be the length if the octet string representing the field element, which may be implementation-defined). Also, the choice of field is not discussed outside this section of the document, although it is implied by the selection of curve parameters elsewhere. Suggest instead to introduce a new parameter such as cLen for the length in octets of the challenge c, and then in the security considerations, comment on the relationship between cLen, qLen, hash function output sizes, and security levels, much as is done in [PWHVNRG17].



T6. Sec. 5, "Fixed options:": Suggest adding ECVRF_hash_points as another fixed option after ECVRF_nonce_generation. (See comment below regarding the name of this technique.)



T7. Sec. 5.4.1.1, "Fixed option:" / "arbitrary_string_to_point" (and elsewhere):  The term "arbitrary" is a misnomer in that it is applied to a string that has already been hashed. Moreover, one of the two options supported for this function in Sec. 5.5 requires the string to be exactly 32 octets, and the other requires it to be at least 32 octets (in a suite that uses SHA-512, so the string will be exactly 64 octets). This contrasts with [PWHVNRG17]'s idea in Appendix A of "a hash function H1 that maps arbitrary-length strings to points on an elliptic curve". Indeed, the "hash to curve" functions in the document are the actual "arbitrary string to point" mappings. One possible solution would be to replace "arbitrary_string_to_point" with a newly defined "encode", following the model given by 5.4.1.2. "string_to_hash" would be computed as "suite_string || one_string || PK_string || alpha_string || ctr_string || zero_string", i.e., step 6B without the hashing, and passed to "encode". Instantiations of the "encode" option would be defined in Sec. 5.5.

An instantiation would include both the hashing and the existing conversion of the hash value to an elliptic curve point.



T8. Sec. 5.4.2: After "not compatible with each other", suggest adding "and are intended for specific suite(s)".



T9. Sec. 5.4.2.1 (also 5.4.2.2), "Output:" / "k": Suggest adding "nonce" before "an integer" to clarify purpose of k.



T10. Sec. 5.4.2.1, next to last para: Suggest adding a note that qlen, the length in bits of q in RFC6979, is not to be confused with qLen, the length in octets of q in this document.



T11. Sec. 5.4.3 (and elsewhere): Suggest redefining "ECVRF_hash_points" as "ECVRF_challenge_generation", limiting to four inputs (H, Gamma, U, and V), and labeling output as "challenge value" rather than "hash value". Rationale: ECVRF_hash_points is only used in this document for mapping the four specified inputs to the challenge c, so it is similar to ECVRF_nonce_generation in its limited purpose. The suggested change does not affect the value computed by the function on the specified inputs, only the way the function is specified.  The benefit of the change is that it simplifies implementation. In particular, implementations only need to be able to handle four points, not an arbitrary number M. Calls to the algorithm would need to be updated similarly. (If the function is not redefined as suggested here, then a note should be added to indicate that implementations MUST be able to handle the case M = 4; other cases are optional.)



T12. Sec. 7.6: Suggest moving the final sentence to its own section, titled "Dependence of challenge on generator and public key". The sentence explains why the challenge c still depends on all six points (B, H, Y, Gamma, U, and V) as per the formal specification in [PWHVNRG17], rather than just the four points input to ECVRF_hash_points. This discussion is important from a security proof perspective and it is separate from the prehashing considerations. Suggest adding "via the point H" to the end of the sentence.



Editorial Comments



E1. Sec. 1.1, para 1, line 3: "with corresponding" --> "with the corresponding"



E2. Sec. 1.1, para 2, line 2: "on data" --> "of data"?



E3. Sec. 2, last para, line 3: "the VRF also comes" --> "the VRFs defined in this document also come" (to match the model discussed in the prior paras where beta can be derived from pi, and to recognize that there are multiple VRFs in the document)



E4. Sec. 3.1, para 3, line 3: "it must only hold if" --> "it is only required to hold if" (see next)



E5. Sec. 3.2, para 3, line 3: "it holds only if" --> "it is only required to hold if" (to clarify that the property may also hold if the condition is not

met)



E6. Sec. 3.3, next to last para, line 2: "knows the valid VRF proof" --> "knows a valid VRF proof" (ECVRF has multiple valid proofs, one for each k)



E7. Sec. 4, para 2, line 3: "parametrized" --> "parameterized"



E8. Sec. 4, "Primitives used:" / "RSASP1": "secret key" --> "private key", "secret RSA exponent" --> "private RSA exponent" (to match "RSA private key"

parameter and terminology in [RFC8017])



E9. Sec. 4.3, "Input:" / "pi_string": "length k" --> "length n"



E10. Sec. 5.3: Reverse order of "pi_string", "alpha_string" in ECVRF_verify function call and "Input:" list (to match API in Sec. 2)



E11. Sec. 5.6.1, step 14: "bad_pk[0]...bad_pk[6]" --> "[bad_pk[0], ...,bad_pk[6]] (to use set notation rather than concatenation -- compare with step 3 in Sec.

5.4.3)



E12. Sec. 7.5, line 5: "Initialized" --> "Initialize"



E13. Sec. 7.7, next to last para: "RSA VRF" --> "RSA-FDH-VRF"



E14. Sec. 7.7, last para, "elliptic curve VRF" --> "ECVRF"



=====







From: CFRG <cfrg-bounces@irtf.org> On Behalf Of Nick Sullivan
Sent: Monday, October 25, 2021 3:07 PM
To: cfrg@irtf.org
Subject: [EXTERNAL] [CFRG] Last call for draft-irtf-cfrg-vrf-09



Caution: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Dear CFRG participants,



The VRF draft has received significant reviews from the RG and the crypto panel and is ready for a second last call. This email commences a last call for this document that will end on the last day of IETF 112 Online (12 Nov 2021):



https://datatracker.ietf.org/doc/draft-irtf-cfrg-vrf/<https://secure-web.cisco.com/1TboK7-gRSZUizkFiD2kXEsavkV_3eVyp5oUUJUw0czoB-x0ujkOBU5BtJLxEr00gdiXE7Fs7_INt9y2wnAlLHX7pGX6t4aU3mhSFpCoyGUtvyKcTacYEv2UxuDTFIudt9w8t-zWZOucuiLZAFx8ezyLvBxjVXzuFWreMqRuRFYEmEGSAGEPgMpRdnrzFAssUINa01Mgrnk1pO-jrALwlNnzbMgqreHF48h5H6rIP6ihH3khmlz5R6OZ4OgsmgeNs/https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fdraft-irtf-cfrg-vrf%2F>



If you've read the document by the end of this period and think that it is ready (or not ready) for publication as an RFC, please send a message in reply to this email. Detailed comments would be helpful. You can reach out directly to CFRG chairs (cfrg-chairs@ietf.org<mailto:cfrg-chairs@ietf.org>) if you have questions about the process.



Thank you,

Nick, Stanislav & Alexey