Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Free functions

in_curve_orderAsserts that the given number is lower than the curve order.
compute_challenge
validate_challenge
reduce_modulo_orderThis is used to cast a felt252 into the curve order. It is used mainly in challenge computation. We could implement more complex function to avoid non-uniform distribution in…
compute_sComputes k + x * c mod (CURVE ORDER). The inputs should be in curve order.
subtract_modulo_curve_order
to_binaryComputes the binary decomposition of the given number u32 number. The output is and array ordered in big in the end.
generate_random_for_testingGenerates a “random” number in the curve order for testing