[CFRG] Re: Feedback on draft-irtf-cfrg-pairing-friendly-curves-12
Emil Lundberg <emil@yubico.com> Mon, 27 July 2026 21:24 UTC
Return-Path: <emil@yubico.com>
X-Original-To: cfrg@mail2.ietf.org
Delivered-To: cfrg@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 72CDB11F797CA for <cfrg@mail2.ietf.org>; Mon, 27 Jul 2026 14:24:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1785187469; bh=MCVd2YUOKKjP4iy/inZEWC0lRvmFs5xiAlux3+yhjdQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=UttkKnnB/iF4AR6lN3njohQe/QGk4J3lzFAtOZ3O+1gF3gKuh+IIZcum2mI8ZzD6T cRDCLiP/I4AqwPWSuu+RjdTeGguTC/ZUjJYpxw1DU/Q6dEpbppmkm5dZbhX89tVTXW rjyERJumprY4Pj0wNSQL7LK1jm2W060yrbSiF3MM=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.663
X-Spam-Level:
X-Spam-Status: No, score=-1.663 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_GREY=0.424] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=yubico.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9q4aCG6AoVk for <cfrg@mail2.ietf.org>; Mon, 27 Jul 2026 14:24:27 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 8D21D11F797C2 for <cfrg@irtf.org>; Mon, 27 Jul 2026 14:24:27 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-4798bea72f9so2048603f8f.1 for <cfrg@irtf.org>; Mon, 27 Jul 2026 14:24:27 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1785187466; cv=none; d=google.com; s=arc-20260327; b=AYp5KPQ/FSF0DJpRhyRNbGy5fWNaOl0hY7C6QbEw52FhNg+iJZB8mjJ+xagGoP3rsP FBYY2Iz6SMRbd60nwMO1E6L9kNkz41HSXQ5juuHOMSiU6fXHoPrFKfjGeB1fIIO6vykh 1bRulQZIHf5481zjY1ABj+Z0PtjkmATvK6MXDSn6+Gt7l35l1eQ31GlIMms0HUyzyaUo /A0Odvi68+HCm2WlBuPFS4U+H7AuD8rCeglKgImlPJ+adU3wMj2+RpUtO4CLozsoC2D4 UleB5QASlykhinD6tTmwIh9+OyWShtyPeLhuTR0yxXZxQyRFk7FSSfZW/FR5F7LhciW/ dtlA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=PKUoADlR7SQdkEjtoB4I/OZYKbkzwv1Bpxej0Lxk7/g=; fh=mtJ6eh2WVXJ8PbDm7HNswsAU5L6yv+ZyqrxUDyi5I1o=; b=fWHddcpEhcqOnpJqRo94k4gMp1Fd0X4PmpU0G+F6uHGWVp8Y+qRU/NLartAL1Ch1yj OXGOMieNTkx3MfSngEKOBi9maPcsfxI6LNL3xhvI/9/jjjFOkGjlc2/ON8EClPWPZ6j2 8P/Om4+v2Fd2rZLMURWqTUoshMcDN2LKMFZjn1AmErhdbElwVI/1c1B0hruyFaMF2JYt XkK2hcwSnwuBAeEdYPGhE4VuOzs1XLig+0xEk8gD7RAKHRYLVBVZ74rprDY3FoQoqi0H OWAK72Kfj+zm2kpT69ZeNMm7dhEumTXaqtyV5sUtLkENelupNwzQbsvJdyNBlflR3aXf iRSA==; darn=irtf.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yubico.com; s=google; t=1785187466; x=1785792266; darn=irtf.org; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to :content-type; bh=PKUoADlR7SQdkEjtoB4I/OZYKbkzwv1Bpxej0Lxk7/g=; b=m8WsAKJ2VyAh5La9vHgywKBlHuI8ZIbXTNsQfzl4KeeIJyT2yJe3p5Z6E/nK4CR/3o 5oWwnY68IBJVspPb2XfKNXUEL3F91s8igHGubO57VU6Q9VE4Wp9TP0nIrppkrpbjnvVu 5lKUZIy5eM6qjK0JZAwuoJhYzTGpPdFDRwmMaIYPFvKsHahYbnNfDIZm0LXjaSmAdoxN nXGg92at1sA/VDqTrA6Lwe6/0YbuC8kN2YZgB7AgwIxQau/YpZOymArBOrmjWhrpRZa6 UWsz3Jm8NmcGDiIA3vzXU7T8ysHcqrQJtC12R9fFsgivAtvpdRF2ilsMv7zT42twD2cq XSGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785187466; x=1785792266; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=PKUoADlR7SQdkEjtoB4I/OZYKbkzwv1Bpxej0Lxk7/g=; b=P69KdZu80lbov2DlBQMibnAW+o0+awH/AE5M8daB+L3xTX/P0WcCEnYWudiZ6OtG3g veE3GQN3DcCi69WYJJPtgbmYjUb2yThh6Vus1KQxJUc4Kn7PWcLSHY9mZne3p/OVsYYI He+JaOvVXbZh8nHKzZDDM2ESfjTfFoOcSFj13BAnMSzNqF+uDXKbi7zrbSsPMxi6ZYZW 7ZZq+YoEKXEmEGBHyx16T16D11h59Pmu1WJPSjO1lDsQXxLCYxzOQ1WUWmgl4FYGBQKr 3sQuGqUTmHSfFJ0fyj1xoJ1a3XhZXSPeJNzEqKsYcI9dDXscAupEBSKxSCPIu3EfV4yI sA/A==
X-Gm-Message-State: AOJu0YzYjEV3PCFUoqRrJT1A8MvEY2Up2JsedeurgBWst+pIHR5dTqTA /rbg4vHp/YIbhj/Ae3rMnqBi1VfpkADWGwIvfos+JjUdxqK2nYjEzAzZdlL3K1x9ADjTT7w+9cG N1V+kRNPpWbPvCcT2IThKVuwkS65SEzU4XEXIfK8fKA==
X-Gm-Gg: AR+sD110fCMh1Ji3envVai3ia1HBsRnBUi+9/wY8TNWE+nPZYYNZskjTFIOZqABiM+G ne6+5dnszPe08ZT79rFgOA8+R6yW0h/57qvKCA+tySM3DGAU8GyzDWTwZ6Y7/F0pe8JaJwZX6Bc nD462cD2IAwLox3R55mcmDhftUCmRGFQsh0dplSCHtPl8nILCUGNGB454ozbSLdXlynJqWqIk+A /hkTAHc96O8GooIA1qE3Bk1mTxCOREGeoG2buo4pYz6zGj3uUbDhxf/d3CaxAmQoI+HwCOqElbV x572mk8syuJdxNiQcTuUpUyuigCWsAWT
X-Received: by 2002:a5d:64c5:0:b0:47f:924a:6542 with SMTP id ffacd0b85a97d-47fafa9eb45mr824590f8f.55.1785187466380; Mon, 27 Jul 2026 14:24:26 -0700 (PDT)
MIME-Version: 1.0
References: <CANMnvkwusQonkcKjyvYbHGeKXbNv3tL4+Zmmm+9=3ErvE+bW9g@mail.gmail.com> <CANZ5RKUy=r4gdv==u2_aLJ4-SS+a27AXQ5GU_=UBn1jQwfSK9g@mail.gmail.com> <CANZ5RKVKPzC9wJ+P+iteZg5qLaq--Mnp8ogJ1rkOwe-kzSFmdA@mail.gmail.com>
In-Reply-To: <CANZ5RKVKPzC9wJ+P+iteZg5qLaq--Mnp8ogJ1rkOwe-kzSFmdA@mail.gmail.com>
From: Emil Lundberg <emil@yubico.com>
Date: Mon, 27 Jul 2026 23:24:09 +0200
X-Gm-Features: AUfX_myRRaMjxuXXmVA7kbosQd1yMhI8m3_4SuZJ1piNAsysm5oouONJcX01ffg
Message-ID: <CANMnvkyPrNHP3vhj8J5U2pfEh_ZJ6rYGYL4V6YwBOb-iR2egqQ@mail.gmail.com>
To: Yumi Sakemi <sakemi-yumi=40gmo-connect.jp@dmarc.ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ca9d1006579e5895"
Message-ID-Hash: SVH3OCBURQD76FYDY63A2WCOCMUODIUB
X-Message-ID-Hash: SVH3OCBURQD76FYDY63A2WCOCMUODIUB
X-MailFrom: emil@yubico.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cfrg.irtf.org-0; header-match-cfrg.irtf.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: cfrg@irtf.org, Satoru Kanno <kanno@gmo-connect.jp>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [CFRG] Re: Feedback on draft-irtf-cfrg-pairing-friendly-curves-12
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/_ywgWwdFeAui-15wokulMSTOe0I>
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>
Hi Yumi, Thank you for this, and apologies for not replying earlier. I agree with your proposed (and performed) changes, and with leaving point 3 (intermediate test vectors) out of scope. Indeed, if there are multiple equivalent ways to compute the same pairing, we should not mandate or favour a particular one by providing test vectors for only one of them. The explicit definition of psi^-1 helps a lot (I had found it in "Pairings for Beginners", but it's a great help to have it inline), as does pointing out that E' points must be untwisted before calling Line_function on them. With these clarifications, my (very slow) "optimal" ate pairing implementation at least doesn't always return 1 as the result anymore. :) I've also confirmed that the pairing test vectors agree with noble-curves given the exponentiation cofactors (e = bls12_381.pairing(bls12_381.G1.Point.BASE, bls12_381.G2.Point.BASE); e2 = bls12_381.fields.Fp12.fromBigTwelve([e_0, e_1, ..., e_11]); assert(bls12_381.fields.Fp12.eql(e, bls12_381.fields.Fp12.pow(e2, 3n)))). That's a great help in verifying that one is using a library and the test vectors together correctly. I'm still not quite sure about the notation e_0, e_1, ..., e_11 for the pairing test vectors, though. You state that "the extension field that e(P, Q) belongs is constructed according to [I-D.ietf-lwig-curve-representations]", but as far as I can tell lwig-curve-representations never mentions towered extension field constructions. As you said earlier (and as I can now verify), these test vectors are formulated in a towered representation - as I understand, the GF(p^12) element is ((e_0 + e_1 * u) + (e_2 + e_3 * u) * v + (e_4 + e_5 * u) * v^2) + ((e_6 + e_7 * u) + (e_8 + e_9 * u) * v + (e_10 + e_11 * u) * v^2) * w = e_0 + e_1 * u + e_2 * v + e_3 * uv + e_4 * v^2 + e_5 * uv^2 + e_6 * w + e_7 * uw + e_8 * vw + e_9 * uvw + e_10 * v^2w + e_11 * uv^2w (this pattern agrees with the GF(p^8) polynomials written out for x' and y' in section 4.3). But I can't find anything in lwig-curve-representations that suggests any representation other than e_11 * t^11 + ... + e_1 * t + e_0. Am I missing something, or is this reference to lwig-curve-representations inaccurate (perhaps left over from an earlier draft version, which later versions diverged from)? Finally, even with these clarifications I am sadly still unable to reproduce the pairing test vectors. The only non-unity pairing e(BP1, BP2) I've managed to produce is this (with the notation e_0 + e_1 * u + ... + e_11 * uv^2w above): e_0 = 0x07002b9494e5c5feddd7fdc1860cb5c9ca9ebc68d4b413a463e8c080e00b17c6710fd99e6112e1c61babfdec952dc785 e_1 = 0x1967896bc3d369a693abde4af9737fac3519651073a989ee3080cce0a9d722edce352251aef6c63ec532e72bd5a6a80c e_2 = 0x12a1b1d275fdd03bc8439d2c83869a68a3b1457944dd9c4cd594c35951ac779840f0094a1a794560db2160ed7434a7c8 e_3 = 0x169ecce6c0853f902c801d8fa5f335f9d40420aca0790fce94986397c01d507615e05a9ae994699c090d0067c7228a24 e_4 = 0x12122bf46976fe1cc707ef899c256ef45ae71167688fcf6fb368d606aa6c3105b9bd1fcbade856ade9dade08502bcd11 e_5 = 0x11742c94cb0f25bab9233f39365752c697fab540ba429c1d8aeb581cd7d813092f695f2b1507a5226c872af20f5bfd63 e_6 = 0x004dbbdd3a96bf70ac681d8e4834a9fb9df69eee8518e162a15a00e3a3f201eb314a9b7fbf5e9495d5e054f98380fe39 e_7 = 0x007a0a27e3c1f62bd259c8fdeb794dd8634816f948aedef0c56dd3b4037f1e3c272af3640f0a9eda97e305da0b7d4701 e_8 = 0x06e06c9b7b9a89b6e280eb1e06ee4fa559639ab4ce0281905a9802addd3bd33c5f7f90b89a1b4e9d3e733c21ea441202 e_9 = 0x028071cf8fa524472cb0a28c5ad3cb58b927545a8eabe3f9356838088eb170b727ca64d15aa19eef4ced24a877b715cc e_10 = 0x0cad8523d8f93b37d8e904067b62811fc488e2894efd9e35929ac27f50dab7725fba0707c5d086297182fcb66744f895 e_11 = 0x066daa4f2dfd8f33b4ac5f5cde897c977f554e640007a311f458a841feef28ed49a4705a3d77cb4b5c3614e2976a3bde It's almost certainly my implementation that's incorrect, especially as I'm getting distinct values for all three of e(BP1, BP2)^2, e(BP1 * 2, BP2) and e(BP1, BP2 * 2). I've tried to implement the pairing pseudocode quite literally. Thank you for your earlier offer to review my code - please do so if you'd like: https://github.com/emlun/python-fido2/blob/d733c3cff32e395c6ab3540b67f8dc1ebfcb9f55/fido2/bls12_381.py#L1344-L1387 . This implementation is mostly for my own learning, not for any practical use, so I'm sorry if much of the code is hard to read, and I don't mind if you don't want to or have time to look much into it. If you do, you can run the code using `python -i fido2/bls12_381.py` and then running `e = opt_ate_pairing(gfp12, CRV_BLS_G1.generator, CRV_BLS_G2.generator, c, t, k)` at the REPL prompt to compute the pairing. It takes about 2 minutes to run on my machines. I'm fairly certain that at least the GF(p^2) math is correct, as I get identical results as noble-curves for BP2*2, BP2*1234 and BP2*((r - 1)/2), but I'm not as confident about the higher-order towered polynomials. Thanks again for your work on the draft and for taking the time to respond to my issues! And again my apologies for not in turn replying sooner. Emil Lundberg Staff Engineer | Yubico <http://www.yubico.com/> Den sön 19 apr. 2026 kl 16:55 skrev Yumi Sakemi <sakemi-yumi= 40gmo-connect.jp@dmarc.ietf.org>: > Hi Emil, all, > > Quick follow-up to my earlier reply: the two GitHub issues I mentioned > are now filed. > > - #77 — Add explicit untwist isomorphism ψ to Section 4.x and clarify > Appendix B G2 representation (normative editorial) > > https://github.com/cfrg/draft-irtf-cfrg-pairing-friendly-curves/issues/77 > > - #78 — Add an informative "Implementation Notes" Appendix > (production library cofactors, final exponentiation decomposition) > > https://github.com/cfrg/draft-irtf-cfrg-pairing-friendly-curves/issues/78 > > Best regards, > Yumi > > 2026年4月19日(日) 19:11 Yumi Sakemi <sakemi-yumi@gmo-connect.jp>: > >> Hi Emil, and CFRG members, >> >> Thank you for the detailed and constructive feedback. Your >> scratch-implementation perspective is exactly the kind of input we >> have been hoping to receive ahead of the crypto-panel review and IETF >> 126 RGLC. >> >> We worked through your four points; here is what we found, including, >> on #4, a finding that revised our own understanding. >> >> --- >> >> Point 4 - e(P, Q) parsing and cross-implementation mismatch >> >> The most consequential first. The reason you could not reproduce the >> Appendix B values via noble-curves is not a parsing error: the draft >> test vectors and the production-library outputs follow different >> conventions. >> >> The tower spec is identical across the draft, mcl, and our independent >> reimplementation (we verified this layer by layer with unit tests). >> Implementing the Appendix A pseudocode literally exactly reproduces >> the Appendix B test vectors for BLS12-381 (12/12) and BN462. After >> reading mcl's source (pairing_impl.hpp) and verifying numerically, we >> found that production libraries return the literal pseudocode value >> raised to a curve-specific exponent - 3 for BLS12-381, a different >> polynomial in u for BN462. The exponents and references will be in >> Issue A-2. >> >> These cofactors are coprime to r, so bilinearity is preserved and >> verification equations hold on either side. The two are mathematically >> valid representations of the same pairing, just normalized >> differently. Because noble-curves agrees with mcl, your value is most >> likely the cofactor-multiplied form. To match Appendix B >> byte-for-byte, the Appendix A pseudocode must be evaluated literally, >> without the cofactor optimization. >> >> --- >> >> Points 1 and 2 - Twist isomorphism and Frobenius endomorphism >> >> We agree there is editorial room for improvement on #1 and #2. The >> pseudocode in Appendix A defines Line_function on points of the >> untwisted curve, but the G2 base points in Appendix B are given in >> twisted form (for compactness), and the explicit untwist isomorphism >> psi that bridges the two is not written in the body. >> >> The overall posture for the draft was discussed at IETF 124 and >> reached rough consensus on a parameter-centric specification - we >> deliberately do not aim to standardize implementation algorithms >> themselves. Picking up Hannes's IETF 124 remark that "this is not a >> binary choice between parameters-only and full tutorial - context is >> valuable", we propose: >> >> - Issue A-1 (normative editorial): add the explicit psi to each >> curve's Section 4.x, and a short note in the introduction of Appendix >> B about the twisted-form representation. psi is a structural fact >> derived from the parameters (twist coefficient + tower spec), not an >> algorithmic choice, so it sits naturally inside the parameter-centric >> scope. >> - Issue A-2 (informative): add an Implementation Notes appendix >> documenting the cofactor relationship in #4, and pointing to the >> standard literature for the easy/hard split of the final >> exponentiation and the construction of the signed binary expansion. >> >> --- >> >> Point 3 - Including intermediate values in test vectors >> >> We took your suggestion seriously, but on reflection we believe >> intermediate values are not actually well-suited as a >> cross-implementation consistency check. >> >> Most standard pairing optimizations (twist isomorphism, NAF and >> signed-binary representations, Miller-loop post-correction, the >> addition chain in the final exponentiation) rely on a structural >> property of the pairing: differences in intermediate state are >> absorbed by the final exponentiation. In our verification work, our >> naive implementation and mcl produced completely different >> 12-coefficient outputs at the end of the Miller loop but converged to >> a cofactor-related pair afterwards. Published intermediate values >> would therefore only match implementations that follow one specific >> Miller-loop variant literally, effectively pinning down a particular >> reference implementation - outside the parameter-centric scope. >> >> We very much understand the implementer's desire to bisect a >> divergence with intermediate diagnostics. We suggest covering this >> through the literature pointers in the Implementation Notes appendix >> instead. >> >> --- >> >> An offer >> >> If it would be useful, we would be glad to support your scratch >> implementation more directly - for example by reviewing your code if >> you point us at a repo, or by joining a repo as a collaborator. Please >> treat this as an open offer rather than a push, and feel free to >> ignore if it isn't helpful. >> >> --- >> >> We will open Issues A-1 and A-2 shortly and post the URLs back on this >> thread. We would be very grateful if you could continue to engage >> during the discussion phase (1-22 May); this kind of implementer >> feedback genuinely strengthens the draft. >> >> Thank you again for the thoughtful and constructive review. >> >> Best regards, >> Yumi >> >> 2026年4月18日(土) 3:04 Emil Lundberg <emil=40yubico.com@dmarc.ietf.org>: >> >>> Hi CFRG and draft authors, >>> >>> I'd like to share some feedback on >>> draft-irtf-cfrg-pairing-friendly-curves-12 >>> <https://www.ietf.org/archive/id/draft-irtf-cfrg-pairing-friendly-curves-12.html> [1], >>> or primarily Appendix A: Computing the Optimal Ate Pairing. I've been >>> trying on and off for a few months (in between other work) to implement >>> this pairing function and reproduce the test vectors, but have not been >>> able to do so. I'm sorry to say that for a reader (me) not already deeply >>> familiar with elliptic curve pairings, Appendix A is not nearly enough to >>> successfully implement the pairing. I've been working through Craig >>> Costello's "Pairings for beginners >>> <https://static1.squarespace.com/static/5fdbb09f31d71c1227082339/t/5ff394720493bd28278889c6/1609798774687/PairingsForBeginners.pdf>" >>> [2] to learn the underlying math and have successfully reproduced many of >>> its examples, but I've not yet been able to take the final step to a >>> working optimal ate pairing. >>> >>> Some concrete points of feedback on the draft: >>> >>> - It's not clear to me if the G2 input (Q) should be in twisted form or >>> not. The introduction of Appendix A reads "[...] implementers should >>> consider the isomorphism of E and its twist curve E' [...]. We note that >>> Line_function does not consider such an isomorphism.". *How* should >>> implementers consider the twist isomorphism? Does Line_function work with >>> and without the twist, and just makes the computation faster, or (since it >>> "does not consider such an isomorphism") does this formulation only work >>> for Q on the untwisted curve? (Line_function directly extracts the >>> coordinate values, so surely it matters if the coordinates are in twisted >>> form or not?) >>> >>> - The same section also reads "The computation of the optimal Ate >>> pairing uses the Frobenius endomorphism. [...]". I cannot see this mapping >>> appear anywhere in the pairing algorithms, so how is it used? I gather >>> vaguely from "Pairings for beginners" that it seems to be used primarily >>> for the final exponentiation, but that's in GT while this paragraph seems >>> to describe the endomorphism only for points on E'(G2). This Frobenius >>> optimizaion seems necessary to compute the final exponentiation in >>> reasonable time, right? Yet the draft doesn't seem to help implementers at >>> all in implementing this optimization. >>> >>> - I think it might greatly help implementers to include a few >>> intermediate values in the test vectors, like maybe the results of >>> Line_function evaluations in the first loop iteration, maybe the value of f >>> before and after the first loop iteration, and maybe the value of f before >>> the final exponentiation. This would help determine whether one has the >>> points in the correct twisted/untwisted form, and whether one is performing >>> the GT operations on f correctly. >>> >>> - Lastly, I've also tried to reproduce the test vectors using existing >>> pairing implementations, with no luck either, so I'm not even sure if I'm >>> correctly parsing the pairing value `e` in the test vectors. The draft says >>> "the extension field that e(P, Q) belongs is constructed according to >>> [I-D.ietf-lwig-curve-representations]." (a more precise section reference >>> would be helpful here), and that along with the 12 (for BLS12-381) linearly >>> numbered limbs seems to me like it's using the direct representation of the >>> coefficients of an 11-degree polynomial over GF(p)? But the implementations >>> I've seen (including my own) work with the towered extension field >>> representation, and the draft too seems to assume this given the >>> definitions in sections 2.5, 4.2 and 4.3. The encoding in section 2.5 is >>> described as generating a single octet stream, but the test vectors are >>> given as a sequence of elements - what gives? This is all to say I haven't >>> managed to parse `e` in a way that it matches the pairing result computed >>> by the noble-curves <https://github.com/paulmillr/noble-curves> [3] >>> library (`e = bls12_381.pairing(bls12_381.G1.Point.BASE, >>> bls12_381.G2.Point.BASE)`). I don't suppose this library would implement >>> some other pairing than the optimal ate pairing? >>> >>> Thank you for your work on the draft and for your patience reading this. >>> I'm happy to help clarify these things, if there's some way I can with my >>> limited experience - please let me know if I can help! >>> >>> [1]: >>> https://www.ietf.org/archive/id/draft-irtf-cfrg-pairing-friendly-curves-12.html >>> [2]: >>> https://static1.squarespace.com/static/5fdbb09f31d71c1227082339/t/5ff394720493bd28278889c6/1609798774687/PairingsForBeginners.pdf >>> [3]: https://github.com/paulmillr/noble-curves >>> >>> Cheers, >>> >>> Emil Lundberg >>> >>> Staff Engineer | Yubico <http://www.yubico.com/> >>> >>> >>> _______________________________________________ >>> CFRG mailing list -- cfrg@irtf.org >>> To unsubscribe send an email to cfrg-leave@irtf.org >>> >>
- [CFRG] Feedback on draft-irtf-cfrg-pairing-friend… Emil Lundberg
- [CFRG] Re: Feedback on draft-irtf-cfrg-pairing-fr… Yumi Sakemi
- [CFRG] Re: Feedback on draft-irtf-cfrg-pairing-fr… Yumi Sakemi
- [CFRG] Re: [EXT] Re: Feedback on draft-irtf-cfrg-… Blumenthal, Uri - 0553 - MITLL
- [CFRG] Re: Feedback on draft-irtf-cfrg-pairing-fr… Emil Lundberg
- [CFRG] Re: Feedback on draft-irtf-cfrg-pairing-fr… Yumi Sakemi
- [CFRG] Re: [EXT] Re: Feedback on draft-irtf-cfrg-… Satoru Kanno
- [CFRG] Re: [EXT] Re: Feedback on draft-irtf-cfrg-… Blumenthal, Uri - 0553 - MITLL
- [CFRG] Re: [EXT] Re: Feedback on draft-irtf-cfrg-… Bellebaum, Thomas
- [CFRG] Re: [EXT] Re: Feedback on draft-irtf-cfrg-… Blumenthal, Uri - 0553 - MITLL