diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-13 10:58:51 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-13 10:58:51 +0200 |
| commit | ed83696f45467f576f67b8da7d403b627fb4606c (patch) | |
| tree | 0b2fc3ad79892a16682271498ed6fb67d9953007 /docs | |
| parent | 61b4dc407ee61d402c4cf72dfa3408af51f86a0e (diff) | |
Additional Detail for Optimal Tower-Based Pairings
So it comes as no surprise the the pairing value in most
implementations is different to what we have here: they implement Fp12
as a tower which behaves different to our polynomial extension field.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/journal/pages/pairings.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/journal/pages/pairings.md b/docs/journal/pages/pairings.md index 793e5be..330f674 100644 --- a/docs/journal/pages/pairings.md +++ b/docs/journal/pages/pairings.md @@ -21,7 +21,7 @@ There are a few such pairings (such as Weil and Tate pairings), but the most com The exact magic that we use isn't super important (and I don't pretend to fully understand it). Additionally, I have found competing implementations compute the actual pairing value differently: - The Pairing-Friendly Curves IETF draft document includes an algorithm for computing the optimal Ate pairing, however, I could not get an implementation to match the provided test vector. In fact, I could not find a single implementation that did pass the test vector (including implementations referenced in the IETF draft itself) - Ethereum `py_ecc` Python implementation of ECC pairing implementation is the _closest_ to the algorithm in the Pairing-Friendly Curves IETF draft, but does not return the same value (it also ignore the sign of the curve's `x` parameter, which drives the Miller loop in the optimal Ate pairing implementation) -- Every other implementation I found (including `zkcrypto/bls12-381` used in ZCash, `kilic/bls12-381` used in Geth, Paul Miller's Noble Curves, etc.) returns yet another value, but implements the optimal Ate loop using more complicated yet more computationally optimal primitives +- Every other implementation I found (including `zkcrypto/bls12-381` used in ZCash, `kilic/bls12-381` used in Geth, Paul Miller's Noble Curves, etc.) returns yet another value, but implements the optimal Ate loop using more complicated yet more computationally optimal primitives. In particular, they implement the 12th degree extension field as a "tower" (so a as `((Fp^2)^3)^2`) which behaves slightly differently than a polynomial extension field like we implemented, although it is much more efficient. In the end, I don't believe the pairing value itself is _that_ important, as you typically build cryptography around "pairing checks", where `e(P1, Q1) * e(P2, Q2) * ... * e(Pn, Qn) = 1`. For example, for signing you provide a signature `S = k * H(m)`, where `k` is your secret key and `H(m)` is the hash of the message `m` to the `G2` curve; given a public key `P`, `e(G1, -S) * e(P, H(m)) = 1`, since that is equal to `e(G1, -k * H(m)) * e(k * G1, H(m)) = e(G1, H(m))^(-k) * e(G1, H(m))^k = 1`. This means that the what matters is that `e` is efficient, bilinear, and non-degenerate (which the implementations above all satisfy). |
