[Research] Optimizing Elligator Squared for BLS Curves via Jacobi Quartics

Hi everyone,

I’d like to share some recent research on drastically reducing the computational overhead of public key obfuscation for BLS signatures.

While the raw storage of BLS12 public keys is great for signature aggregation, it exposes validators to linkability and subgroup membership leakage. Obfuscating these keys into uniform random bitstrings via the Elligator Squared framework is cryptographically sound, but typically introduces a heavy latency penalty due to costly inverse isogeny maps and full-scalar cofactor blinding/clearing.

We have developed an optimized obfuscation and deobfuscation pipeline that practically eliminates this field-scaling penalty. By utilizing steganographically engineered curve variants (BLS12-479+ and BLS12-539+) that natively support a computational 2-isogeny bridge, we establish a strict birational equivalence to the Extended Jacobi Quartic space.

Key Architectural Optimizations:

  • Inversion-Free Arithmetic: By fusing Billet-Joye birational mappings with Hişil’s homogeneous projective coordinates P(1,1,1), we completely eliminate intermediate field inversions. The pipeline defers the solitary field inversion to the final affine projection at the absolute end of the deobfuscation cycle.

  • Jacobi Quartic Sandbox: Heavy scalar multiplications are executed entirely within the accelerated Jacobi space using an ultra-fast dedicated doubling formula (3M+4S+1C+3add).

  • Asymmetric wNAF with Batch-Normalized Tables: We employ a wide window (w=5) for full-scalar blinding and a minimal window (w=2) for the receiver’s Fast Cofactor Clearing (∣1−z∣ scalar).Precomputation tables are normalized (Z=1) using Montgomery Batch Inversion, allowing the main evaluation loop to exclusively execute dedicated addition formulas (9M+5S+1C+6add).

Empirical Results (100,000 Deterministic Iterations on Magma V2.29-6):

Our user-level interpreted prototype completely absorbs the field-scaling penalty, outperforming the pre-compiled C-library baseline for standard BLS12-381:

  • BLS12-381 (Native C-compiled baseline): 26.43M cycles (Obfuscation) | 2.66M cycles (Deobfuscation)

  • BLS12-479+ (Interpreted Jacobi): 15.63M cycles (Obfuscation, 40.9% faster) | 2.96M cycles (Deobfuscation)

  • BLS12-539+ (Interpreted Jacobi): 18.26M cycles (Obfuscation, 30.9% faster) | 3.16M cycles (Deobfuscation)

To rigorously isolate the algorithmic density from the interpreter’s overhead, we also ran a targeted microbenchmark on the pure scalar multiplication loop. Magma’s native, C-compiled intrinsic for the Weierstrass curve executed in 11.46M cycles. In contrast, our fully interpreted Jacobi wNAF script completed the same operation in 15.26M cycles. Achieving a latency ratio of just 133.1% against a heavily optimized native C core mathematically validates the profound efficiency of the 8M+5S Jacobi arithmetic.

Given that our interpreted Magma script already operates below the pre-compiled 381-bit baseline despite virtual machine dispatch overheads, we project that a compiled C/Rust implementation—stripping away this 34.8% interpreter gap and leveraging Thread/Instruction-Level Parallelism—will comfortably shatter native thresholds for production consensus clients.

Feedback, questions, and thoughts—especially regarding potential Rust/C reference implementations for validator nodes—are highly welcome!

The main protocol question is whether this is intended as a drop-in encoding for existing BLS12-381 validator keys. BLS12-479+ and BLS12-539+ change the curve and subgroup, so existing consensus clients cannot verify those keys without a coordinated spec and key migration. It’d help to state the threat model and separate encoding privacy from any change to the signature scheme; the cycle comparison alone doesn’t establish interoperability or constant-time behavior.

Thank you for the constructive feedback! These are exact protocol-level questions that deserve a clear separation between (1) what can be deployed as a drop-in transport layer for existing BLS12-381 validators today, and (2) what requires a curve migration (BLS12-479+ / BLS12-539+).

Here is a breakdown of the architectural scope, threat model, and constant-time guarantees:

1. Drop-in BLS12-381 Compatibility vs. Next-Gen Curve Migration (BLS12-479+ / BLS12-539+)

This work does not claim that the Jacobi Quartic optimization itself is a drop-in replacement for existing BLS12-381 validator keys. As noted in Section 1, mapping to the Extended Jacobi Quartic model mathematically requires a rational point of order 2 on the isogenous curve E_isog, which exists on 2-isogeny bridges (BLS12-479+, BLS12-539+) but is absent on BLS12-381 (which relies on a degree-11 isogeny bridge).

Accordingly, there are two distinct deployment tracks:

  • Track A — Drop-in Wire Obfuscation for Existing BLS12-381 (No Key Migration): Existing BLS12-381 public keys can be obfuscated into uniform bitstrings today using the explicit analytical inverse 11-isogeny bridge in standard Weierstrass coordinates (derived in [9] and included as the BLS12-381 (Native Weierstrass) baseline in Table 1: ~26.4M cycles for obfuscation, ~2.67M cycles for deobfuscation). This operates purely as an encoding wrapper and requires zero changes to existing validator keys.
  • Track B — High-Efficiency Steganographic Curves (BLS12-479+ / BLS12-539+): These curves change the base field and subgroup (targeting ~160-bit and ~192-bit security levels while constructing a degree-2 isogeny bridge). Adopting them in an existing consensus layer would indeed require a coordinated specification and key migration (or deployment in greenfield L2s, appchains, or stealth relay networks). The key finding of our paper is that if a protocol migrates to 479-bit or 539-bit primes for higher security and 2-isogeny steganography, fusing the 2-isogeny with Jacobi Quartic arithmetic completely neutralizes the multi-precision field-scaling penalty, making it even faster than 381-bit Weierstrass obfuscation.

2. Separation of Encoding Privacy from the Signature Scheme

Crucially, the core BLS signature scheme, pairing equations, and signature aggregation logic remain 100% untouched in both tracks. The proposed pipeline is strictly a stateless transport/storage-layer encoding for G₁ points:

┌──────────────┐                  ┌──────────────────┐                    ┌──────────────┐
│   P  ∈  G₁   │ ──[ Obfuscate ]─►│(u, v) ∈ F_p x F_p│ ──[ Deobfuscate ]─►│   P  ∈  G₁   │
│ (Affine Key) │                  │ (Uniform Strings)│                    │ (Exact Key)  │
└──────────────┘                  └──────────────────┘                    └──────────────┘
  1. On the sender side, an existing affine point P in G1 is mapped to E_isog, blinded by a random cofactor point [q]R_cof, and decomposed via inverse SSWU into two uniform field elements (u, v).
  2. On the receiver side, the fused deobfuscation map (J_{a1,d} -> E, Eqs. 9–10) deterministically reconstructs the exact original affine point P in E(F_p)[q] after Fast Cofactor Clearing (|1 - z|). Once P is recovered, consensus clients feed it into standard BLS verification and aggregation routines without any modification.

3. Explicit Threat Model

The pipeline addresses two orthogonal threat vectors:

  1. Network-Level Censorship, DPI, and Validator Linkability (Encoding Privacy): Raw compressed G1 points exhibit strict algebraic distinguishers (curve equation residuals, header bits, and subgroup structure). An eavesdropper or Deep Packet Inspection (DPI) censor monitoring P2P gossip can trivially fingerprint BLS public keys, correlate validator identities across sessions, or selectively drop attestation packets. By randomizing the cofactor component ([q]R_cof) on every transmission and applying Elligator Squared, the wire representation (u, v) is computationally and statistically indistinguishable from uniform random noise, while multiple transmissions of the same public key produce completely unlinkable bitstrings.

  2. Subgroup Membership Leakage & Side-Channel Extraction: To prevent Lim–Lee style small-subgroup attacks [1] when accepting arbitrary bitstrings (u, v) from untrusted peers, the receiver enforces strict Fast Cofactor Clearing via |1 - z| before projecting back to E. For hardware environments exposed to timing or Simple Power Analysis (SPA) [13], the sender/receiver must prevent side-channel leakage of the blinding scalar or intermediate point coordinates.

4. Constant-Time Behavior vs. Cycle Benchmarks

We completely agree that cycle counts alone do not prove constant-time execution—especially in an interpreted prototyping environment like Magma. That is why Section 4 and Section 5.1 explicitly separate the implementation into two distinct profiles:

  • High-Throughput Mode (Asymmetric wNAF): Explicitly designated as variable-time (w = 5 for blinding, w = 2for FCC with Montgomery batch inversion) for trusted environments where side-channel monitoring is outside the threat model.

  • SPA-Resistant Constant-Time Mode (Montgomery Ladder): The constant-time guarantee here is structural, not merely inferred from average cycle counts:

    1. Branchless Uniform Arithmetic: Every scalar bit executes an identical instruction sequence—specifically one unified addition (UnifiedAddJq_Prj: 9M + 7S + 1C + 15add, which is complete/unified and handles doubling without branching) and one dedicated doubling (DedicatedDblJq_Prj: 3M + 4S + 1C + 3add)—paired with arithmetic constant-time conditional swaps (cswap).

    2. Zero Intermediate Inversions: By fusing the rational isogeny fractions directly with the Billet–Joye birational maps in homogeneous projective space (X_J : Y_J : Z_J) (Section 3.1), the entire scalar loop executes without a single modular inversion, deferring the only inversion to the final affine projection (calculable via constant-time Fermat exponentiation x^(p - 2)).

    3. Fixed-Iteration Rejection Sampling: As noted in Section 5, in a production constant-time deployment, the probabilistic Elligator Squared pick-and-check loop on the sender side is wrapped in a fixed-bound loop of N iterations using dummy operations after a valid preimage is found, while receiver-side deobfuscation is strictly deterministic (a single pass).

The linear cycle ratio reported in Section 5 (539 / 80 ≈ 6.74 and 479 / 80 ≈ 5.99) was included specifically to verify that our Magma prototype of the ladder contains no hidden Hamming-weight-dependent branches, serving as an algebraic specification for bare-metal C/Rust implementations (where constant-time verification tools such as dudect or ctgrind apply).