Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

get_b_twist

Returns the b parameter for the twisted curve E’(Fp2) used in pairing operations.

The twisted curve has equation: y² = x³ + b’ where b’ is in Fp2.

Arguments

  • curve_index - Index of the curve (must be 0 for BN254 or 1 for BLS12_381)

Returns

  • Tuple (b₀, b₁) where b’ = b₀ + i·b₁ in Fp2 = Fpi/(i² + 1)

Panics

  • Panics for curves without pairing support (not BN254 or BLS12_381)

Fully qualified path: garaga::definitions::curves::get_b_twist

pub fn get_b_twist(curve_index: u32) -> (u384, u384)