Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
field_utils.hpp File Reference
#include "./field.hpp"
#include <utility>

Go to the source code of this file.

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 
namespace  bb::stdlib
 

Functions

template<typename Builder >
std::pair< field_t< Builder >, field_t< Builder > > bb::stdlib::split_unique (const field_t< Builder > &field, const size_t lo_bits, const bool skip_range_constraints=false)
 Split a bn254 scalar field element into unique lo and hi limbs.
 
template<typename Builder >
void bb::stdlib::validate_split_in_field (const field_t< Builder > &lo, const field_t< Builder > &hi, const size_t lo_bits, const uint256_t &field_modulus)
 Validates that lo + hi * 2^lo_bits < field_modulus.