Path: blob/main/frontier/07-pairings/break/pairing-inversion-attempt.ipynb
483 views
Break: Pairing Inversion Attempt
Module 07 | Breaking Weak Parameters
Try to recover discrete logs from pairing outputs and see why it's hard.
Why This Matters
Every pairing-based protocol. BLS signatures, identity-based encryption, SNARKs -- relies on the assumption that the pairing cannot be "inverted." Specifically:
BLS signatures: if you could invert to recover , you could forge signatures.
Boneh-Franklin IBE: if you could invert the pairing, you could recover private keys.
SNARKs: pairing-based proof systems would be unsound.
The pairing "transfers" the discrete log problem from the curve to the target group . The security of pairing-based crypto depends on the DLP being hard in both the curve group and the target group. Let's see this transfer in action and understand why inversion is hard.
The Scenario
Given a pairing and a value in the target group, the pairing inversion problem asks:
Find such that (equivalently, recover the discrete log from pairing output).
The key observation is that . So if we know and , recovering reduces to solving the DLP in .
Step 2: The Pairing Transfers the DLP
Suppose someone knows and but not . The pairing reveals:
So the unknown scalar appears as an exponent in the target group. If we can solve the DLP in , we recover .
Step 4: Why This Gets Hard
Our toy example had . Brute force was trivial. But for cryptographic parameters:
BLS12-381 uses and , so the target group lives in with .
The DLP in is subject to index calculus attacks, but for properly chosen parameters, the best known attacks are still exponential.
The embedding degree is chosen so that the DLP in is at least as hard as the ECDLP on the curve (128-bit security for BLS12-381).
Let's see the brute force become infeasible as we increase the prime.
The Insight: Pairing Inversion is at Least as Hard as DLP in
The chain of reasoning:
Pairing transfers DLP: means the curve DLP maps to a target DLP.
Pairing inversion requires target DLP: to recover from , you must solve the DLP in .
Security parameter choice: the embedding degree is chosen so that the DLP in matches the ECDLP difficulty on the curve.
If is too small (e.g., ), the target group DLP might be easier than the curve DLP, weakening security. This is why embedding degree matters: it's the bridge between curve security and target group security.
Exercises
SageMath's
discrete_log: Usediscrete_log(g_T^x, g_T)in the target group for our toy example. Verify it gives the correct . Then try it with progressively larger primes and observe the time growth.MOV attack connection: The MOV (Menezes-Okamoto-Vanstone) attack uses pairings to reduce the ECDLP to a DLP in . For our supersingular curve with , this is exactly what we did above. Explain why MOV is only useful when is small relative to the curve security level.
Why not ? If (embedding degree 1), the Weil pairing maps directly into . Explain why this makes pairing-based crypto insecure (hint: index calculus in for 256-bit ).
Summary
| Concept | Detail |
|---|---|
| DLP transfer | moves the discrete log from the curve to |
| Pairing inversion | Recovering from requires DLP in |
| Small examples | Brute force works for ; infeasible for |
| Embedding degree | balances curve security and target group security |
| MOV attack | Uses this transfer offensively: reduce ECDLP to DLP in |
Key takeaway: the pairing is a one-way bridge. It moves algebraic relationships from the curve to the target group (which protocols exploit for verification), but inverting this bridge, recovering curve discrete logs from target group elements, is as hard as the DLP in . Properly chosen parameters make this infeasible.
Back to Module 07: Bilinear Pairings