Skip to main content

Crate miden_precompiles

Crate miden_precompiles 

Source

Structs§

CurveCoefficient
A fixed curve coefficient uint pinned at a VM-owned store pointer.
CurvePrecompile
Precompile for point operations over the fixed supported curves.
HashAssertNode
A structural view of a hash assertion node owned by HashPrecompile.
HashPrecompile
A hash assertion precompile parameterized by its HashFunction.
K1Base
Marker type for the secp256k1 base field.
K1Scalar
Marker type for the secp256k1 scalar field.
U256
Marker for arithmetic modulo 2^256.
UintPrecompile
Precompile for 256-bit arithmetic over fixed uint domains.

Enums§

CurveId
Fixed curves supported by the native curve precompile.
CurveNodeRef
Structural view of a curve precompile node.
CurvePoint
Curve-generic point value.
UintDomain
Fixed uint arithmetic domains supported by the native uint precompile.
UintNodeRef
Structural view of a uint precompile node.

Constants§

K1_A_PTR
VM-owned store pointer for the secp256k1 curve coefficient A.
K1_BASE_BOUND_PTR
VM-owned store pointer for the secp256k1 base-field bound (p - 1).
K1_B_PTR
VM-owned store pointer for the secp256k1 curve coefficient B.
K1_GROUP_PTR
VM-owned store pointer for the secp256k1 group configuration.
K1_SCALAR_BOUND_PTR
VM-owned store pointer for the secp256k1 scalar-field bound (n - 1).
ONE_LIMBS
The canonical one value in every supported uint domain.
SECP256K1_GENERATOR_X
Standard secp256k1 generator x-coordinate, little-endian u32 limbs.
SECP256K1_GENERATOR_Y
Standard secp256k1 generator y-coordinate, little-endian u32 limbs.
SECP256K1_ID
Stable local curve selector for secp256k1.
TWO_LIMBS
The canonical two value in every supported uint domain.
U256_BOUND_PTR
VM-owned store pointer for the U256 wrapping-domain bound (2^256 - 1).
ZERO_LIMBS
The canonical zero value in every supported uint domain.

Traits§

CurveSpec
Spec for one fixed curve.
HashFunction
The byte-level hash backing a HashPrecompile.
ShortWeierstrassSpec
Short-Weierstrass-specific parameters for curves of the form y^2 = x^3 + A*x + B.
UintSpec
Spec for one fixed uint arithmetic domain.

Functions§

chunks_to_bytes_exact
Unpack exactly expected_chunks u32-packed-LE chunks back to a n_bytes-length byte vector.
curve_coefficients
Returns all fixed curve coefficients in VM pointer order.
n_chunks
Number of 8-felt chunks needed to encode n_bytes of u32-packed input.
registry
Returns a PrecompileRegistry containing the precompiles provided by this crate.

Type Aliases§

Keccak256Precompile
The Keccak-256 precompile, installed by registry.
Limbs
Little-endian 256-bit value represented as eight u32 limbs.