LibCircuit.LimbsThis module is a more generic version of Bytes, where each scalar stores an nb_bits-bit number.
module N : sig ... endtype 'a input = 'a Input.tInput for a Plompiler program.
type scalar = scalarElement of the native scalar field.
type 'a repr = 'a reprRepresentation of values.
type 'a t = 'a tPlompiler program.
type tl = scalar listRepresentation of elements.
input_bytes ~le b returns the representation of b that Plompiler expects as input. le can be used to set the endianness.
constant ~le b returns the constant b as a Plompiler value. le can be used to set the endianness.
of_scalar ~total_nb_bits b converts the scalar b of size total_nb_bits in bits into the tl representation.
of_bool_list b converts the list of bits in little-endian order into the tl representation.
to_bool_list b returns the list of bits in little-endian order, representing the value b.
rotate_right b n shifts the bits right by n positions, so that each bit is less significant. The least significant bit becomes the most significant i.e. it is "rotated". rotate_right bs (length bl) = bl