Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

definitions

Fully qualified path: garaga::definitions

Modules

curves
structs

Re-exports:

BLS12_381
BLS12_381_SEED_BITSStandard binary representation of BLS12-381 seed parameter x = 0xD201000000010000 Used for basic Miller loop operations Format: bin(x) [ 2: ] [ 2: ]…
BLS12_381_SEED_BITS_COMPRESSEDCompressed binary representation of BLS12-381 seed parameter x = 0xD201000000010000 for efficient Miller loop computation. Binary digits with consecutive zeros replaced by 3 for compression…
BLS_G2_GENERATORGenerator point for the G2 subgroup of BLS12-381’s twisted curve E’(Fp2) Coordinates are in Fp2 represented as (x₀ + i·x₁, y₀ + i·y₁)
BLS_X_SEED_SQSquare of the BLS12-381 x seed parameter used in curve generation
BN254
BN254_SEED_BITS_JY00_COMPRESSEDCompressed NAF (Non-Adjacent Form) representation of BN254 seed parameter for efficient Miller loop computation in pairing operations. Computed as: recode_naf_bits(jy00(6·x + 2) 2:…
BN254_SEED_BITS_NAFNAF (Non-Adjacent Form) representation of BN254 seed parameter for Miller loop computation in pairing operations. Computed as: NAF(6·x + 2) 1: where x = 0x44E992B44A6909F1…
ED25519
GRUMPKIN
SECP256K1
SECP256R1

get_BLS12_381_modulusReturns the BLS12-381 base field modulus as CircuitModulus.
get_BLS12_381_order_modulusReturns the BLS12-381 curve order as CircuitModulus.
get_BN254_modulusReturns the BN254 base field modulus as CircuitModulus.
get_BN254_order_modulusReturns the BN254 curve order as CircuitModulus.
get_ED25519_modulusReturns the ED25519 base field modulus as CircuitModulus. (Modulus of the birationally equivalent Weierstrass curve)
get_ED25519_order_modulusReturns the ED25519 curve order as CircuitModulus.
get_GReturns the standard generator point G of the curve’s prime-order subgroup. This is the base point used for scalar multiplication and key generation….
get_GRUMPKIN_modulusReturns the GRUMPKIN base field modulus as CircuitModulus.
get_GRUMPKIN_order_modulusReturns the GRUMPKIN curve order as CircuitModulus.
get_SECP256K1_modulusReturns the SECP256K1 base field modulus as CircuitModulus.
get_SECP256K1_order_modulusReturns the SECP256K1 curve order as CircuitModulus.
get_SECP256R1_modulusReturns the SECP256R1 (P-256) base field modulus as CircuitModulus.
get_SECP256R1_order_modulusReturns the SECP256R1 (P-256) curve order as CircuitModulus.
get_aReturns the Weierstrass ‘a’ parameter for a given curve. For Weierstrass curves: y² = x³ + ax + b…
get_bReturns the Weierstrass ‘b’ parameter for a given curve. For Weierstrass curves: y² = x³ + ax + b…
get_b_twistReturns 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….
get_curve_order_modulusReturns the curve order n as a CircuitModulus for circuit operations. CircuitModulus is used by Cairo’s circuit builtins for modular arithmetic in the scalar field….
get_eigenvalueReturns the eigenvalue λ for the curve’s efficiently computable endomorphism. The endomorphism φ satisfies φ(P) = λ·P for points P on the curve….
get_gReturns a generator g of the multiplicative group Fp * for a given curve. This generator is used for various field operations and exponentiations….
get_min_oneReturns (-1) mod p precomputed for the base field Fp. This is equivalent to (p - 1) and is frequently used in field arithmetic….
get_min_one_orderReturns (-1) mod n precomputed for the scalar field (curve order). This is equivalent to (n - 1) and is used for scalar arithmetic operations….
get_modulusReturns the base field modulus p as a CircuitModulus for circuit operations. CircuitModulus is used by Cairo’s circuit builtins for modular arithmetic….
get_nReturns the order n of the curve’s prime-order subgroup. This is the number of points in the main cryptographic subgroup. For most curves, this equals #E(Fp)/cofactor….
get_nG_glv_fake_glvReturns the precomputed point 2^(nbits-1)·G for GLV/fake-GLV decomposition. This precomputed value is used to accelerate scalar multiplication via…
get_pGETTER FUNCTIONS /// Returns the prime modulus p of the base field Fp for a given curve….
get_third_root_of_unityReturns a primitive cube root of unity ω in the base field Fp. This element satisfies ω³ = 1 and ω ≠ 1, and is used in GLV endomorphism computations for accelerating scalar multiplication….
has_endomorphism_availableChecks if a curve has an efficient endomorphism available for GLV decomposition. GLV (Gallant-Lambert-Vanstone) decomposition accelerates scalar multiplication…
deserialize_u384
deserialize_u384_array
serialize_u384
serialize_u384_array

u384A 384-bit unsigned integer, used for circuit values.
CurveComplete curve parameters for elliptic curves in Weierstrass form: y² = x³ + ax + b…
E12DDegree-12 extension field element (generic coefficients). Represents an element of the extension field F _ {q^12} modeled as the quotient ring F_q w /p(w), where p(w) is an irreducible polynomial of…
E12TDegree-12 extension field element using a 2-3-2 tower construction. The field F _ {q^12} is built in three steps:…
RSA2048ChunksA 2048-bit integer packed into 6 chunks of at most 384 bits each (the top chunk w5 is constrained to 128 bits). Given 22 limbs of 96 bits, groups of 4 consecutive limbs form one u384…
RSA2048ReductionWitnessWitness for one modular reduction a * b = q * n + r over Z, where q (quotient) and r (remainder) are 2048-bit integers in chunk representation.
u288
G1G2Pair
G1Point
G2Line
G2Point
BLSProcessedPair
BNProcessedPair
MillerLoopResultScalingFactor

u96A 96-bit unsigned integer type used as the basic building block for multi-limb arithmetic.

OneDefines a multiplicative identity element for T ….
ZeroDefines an additive identity element for T ….