16template <
typename Builder>
class cycle_group;
37 using Curve =
typename Builder::EmbeddedCurve;
41 static constexpr size_t NUM_BITS = ScalarField::modulus.get_msb() + 1;
42 static constexpr size_t LO_BITS = field_t::native::Params::MAX_BITS_PER_ENDOMORPHISM_SCALAR;
cycle_scalar represents a member of the cycle curve SCALAR FIELD. This is NOT the native circuit fiel...
typename Builder::EmbeddedCurve Curve
typename Curve::ScalarField ScalarField
bool skip_primality_test() const
bool use_bn254_scalar_field_for_primality_test() const
stdlib::bigfield< Builder, typename ScalarField::Params > BigScalarField
static constexpr size_t NUM_BITS
static cycle_scalar create_from_bn254_scalar(const field_t &_in, bool skip_primality_test=false)
Use when we want to multiply a group element by a string of bits of known size. N....
ScalarField get_value() const
bool _use_bn254_scalar_field_for_primality_test
cycle_scalar(const field_t &_lo, const field_t &_hi, const size_t bits, const bool skip_primality_test, const bool use_bn254_scalar_field_for_primality_test)
static cycle_scalar from_witness(Builder *context, const ScalarField &value)
static cycle_scalar from_witness_bitstring(Builder *context, const uint256_t &bitstring, size_t num_bits)
Use when we want to multiply a group element by a string of bits of known size. N....
static constexpr size_t LO_BITS
void validate_scalar_is_in_field() const
Checks that a cycle_scalar value is smaller than a prime field modulus when evaluated over the INTEGE...
bool _skip_primality_test
void unset_free_witness_tag()
Unset the free witness flag for the cycle scalar's tags.
Builder * get_context() const
void set_free_witness_tag()
Set the free witness flag for the cycle scalar's tags.
void set_origin_tag(const OriginTag &tag) const
Set the origin tag of lo and hi members of cycle scalar.
static constexpr size_t HI_BITS
OriginTag get_origin_tag() const
Get the origin tag of the cycle_scalar (a merge of the lo and hi tags)
void unset_free_witness_tag() const
Unset the free witness flag for the field element's tag.
Builder * get_context() const
OriginTag get_origin_tag() const
void set_free_witness_tag()
Set the free witness flag for the field element's tag.
void set_origin_tag(const OriginTag &new_tag) const
StrictMock< MockContext > context
This file contains part of the logic for the Origin Tag mechanism that tracks the use of in-circuit p...