Bn254 Field Library
Noir provides a module in standard library with some optimized functions for bn254 Fr in std::field::bn254
.
decompose
fn decompose(x: Field) -> (Field, Field) {}
Decomposes a single field into two fields, low and high. The low field contains the lower 16 bytes of the input field and the high field contains the upper 16 bytes of the input field. Both field results are range checked to 128 bits.